Date: Fri, 12 Dec 2003 05:38:38 +0800 (MYT) From: Ariff Abdullah <skywizard@MyBSD.org.my> To: FreeBSD-gnats-submit@FreeBSD.org Cc: sos@FreeBSD.org Subject: kern/60163: ATA failed to mount data track of CD-EXTRA multisession cd Message-ID: <20031211213838.234D46CC8E@tomoyo.MyBSD.org.my> Resent-Message-ID: <200312112140.hBBLe6uk066678@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60163 >Category: kern >Synopsis: ATA failed to mount data track of CD-EXTRA multisession cd >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 11 13:40:06 PST 2003 >Closed-Date: >Last-Modified: >Originator: Ariff Abdullah >Release: FreeBSD 4.6.2-RELEASE i386 >Organization: MyBSD >Environment: System: FreeBSD 4.x / 5.1 >Description: Mounting multisession cd will fail with 'invalid argument'. This only occur if the very first track of the cd is NOT a data track, because the atapi-cd driver rely only on the first track to decide which block_size to use. However the cd can be mounted successfully through atapi-cam subsystem, or using older FreeBSD release (2.2.x). >How-To-Repeat: Insert multisession cd (perhaps audio + data, where audio is in first session and at the beginning of the track) # mount_cd9660 /dev/acd0c /cdrom mount_cd9660: /dev/acd0c: Invalid argument # mount_cd9660 -s the_exact_sector /dev/acd0c /cdrom mount_cd9660: /dev/acd0c: Invalid argument >Fix: 1) enable atapicam support and mount the cd using /dev/cd0c (only a workaround). 2) Apply this patch (perhaps fix) --- sys/dev/ata/atapi-cd.c.orig Thu Dec 11 02:20:33 2003 +++ sys/dev/ata/atapi-cd.c Thu Dec 11 02:26:14 2003 @@ -1277,7 +1277,13 @@ } cdp->toc.hdr.len = ntohs(cdp->toc.hdr.len); - cdp->block_size = (cdp->toc.tab[0].control & 4) ? 2048 : 2352; + cdp->block_size = 2352; + for (track = 0; track < ntracks; track++) { + if (cdp->toc.tab[track].control & 4) { + cdp->block_size = 2048; + break; + } + } acd_set_ioparm(cdp); bzero(ccb, sizeof(ccb)); ccb[0] = ATAPI_READ_CAPACITY; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031211213838.234D46CC8E>