Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 11:05:20 +1030 (CST)
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/46000: Fix reading of mixed-mode CD's in ATAPI CDROM drives
Message-ID:  <200212050035.gB50ZKOX068150@cain.gsoft.com.au>

next in thread | raw e-mail | index | archive | help

>Number:         46000
>Category:       kern
>Synopsis:       Fix reading of mixed-mode CD's in ATAPI CDROM drives
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 04 16:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Daniel O'Connor
>Release:        FreeBSD 4.7-RC i386
>Organization:
>Environment:
System: FreeBSD cain.gsoft.com.au 4.7-RC FreeBSD 4.7-RC #11: Mon Sep 30 17:25:01 CST 2002 doconnor@cain.gsoft.com.au:/usr/obj/usr/src/sys/CAIN i386


>Description:
The ATAPI CD code picks the block size of the first track as the default when
trying to mount a CD, this breaks when you have a mixed mode CD and the first
track is audio (Tries to read a data track with a block size of 2352 bytes)

>How-To-Repeat:
mount_cd9660 /dev/acd0c /mnt

>Fix:

Obtained from Chris Faulhaber <jedgar@fxp.org>
See message ID 20021015010307.GA39347@peitho.fxp.org on -stable.

Index: sys/dev/ata/atapi-cd.c
===================================================================
RCS file: /usr/CVS-Repository/src/sys/dev/ata/atapi-cd.c,v
retrieving revision 1.48.2.17
diff -u -r1.48.2.17 atapi-cd.c
--- sys/dev/ata/atapi-cd.c      31 Jul 2002 11:19:25 -0000      1.48.2.17
+++ sys/dev/ata/atapi-cd.c      5 Dec 2002 00:29:40 -0000
@@ -1263,7 +1263,7 @@
     }
     cdp->toc.hdr.len = ntohs(cdp->toc.hdr.len);
 
-    cdp->block_size = (cdp->toc.tab[0].control & 4) ? 2048 : 2352;
+    cdp->block_size = 2048;
     acd_set_ioparm(cdp);
     bzero(ccb, sizeof(ccb));
     ccb[0] = ATAPI_READ_CAPACITY;

http://www.gsoft.com.au/~doconnor/atapi-cd-mixed.patch

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212050035.gB50ZKOX068150>