From owner-freebsd-bugs Wed Feb 21 4:40:16 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1973237B401 for ; Wed, 21 Feb 2001 04:40:13 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1LCeCB44545; Wed, 21 Feb 2001 04:40:12 -0800 (PST) (envelope-from gnats) Date: Wed, 21 Feb 2001 04:40:12 -0800 (PST) Message-Id: <200102211240.f1LCeCB44545@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Tony Finch Subject: Re: kern/25240: incomplete CDIOCREADSUBCHANNEL support in atapi-cd Reply-To: Tony Finch Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/25240; it has been noted by GNATS. From: Tony Finch To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: Re: kern/25240: incomplete CDIOCREADSUBCHANNEL support in atapi-cd Date: Wed, 21 Feb 2001 12:31:39 +0000 Following a conversation with sos about this I have tried the following patch which has the same end result (at least on my hardware) but takes a slightly different route. This patch needs some finishing to deal with the way the data is prepared for copyout(); I note that the CAM SCSI CD driver just copies the response data from the device straight into the user's args->data block. Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at CROMARTY: NORTHWESTERLY 5 TO 7, OCCASIONALLY GALE 8 IN NORTHEAST. SHOWERS. GOOD. Index: atapi-cd.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.48.2.9 diff -u -r1.48.2.9 atapi-cd.c --- atapi-cd.c 2001/01/29 18:07:18 1.48.2.9 +++ atapi-cd.c 2001/02/21 11:08:56 @@ -726,7 +726,8 @@ struct cd_sub_channel_info data; int len = args->data_len; int32_t abslba, rellba; - int8_t ccb[16] = { ATAPI_READ_SUBCHANNEL, 0, 0x40, 1, 0, 0, 0, + int8_t ccb[16] = { ATAPI_READ_SUBCHANNEL, 0, 0x40, + args->data_format, 0, 0, 0, sizeof(cdp->subchan)>>8, sizeof(cdp->subchan), 0, 0, 0, 0, 0, 0, 0 }; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message