From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 11 13:40:10 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6343F16A4CE for ; Thu, 11 Dec 2003 13:40:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E49B943D33 for ; Thu, 11 Dec 2003 13:40:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBBLe6FR066679 for ; Thu, 11 Dec 2003 13:40:06 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBBLe6uk066678; Thu, 11 Dec 2003 13:40:06 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 11 Dec 2003 13:40:06 -0800 (PST) Resent-Message-Id: <200312112140.hBBLe6uk066678@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ariff Abdullah Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACDAB16A4CE; Thu, 11 Dec 2003 13:37:59 -0800 (PST) Received: from tomoyo.MyBSD.org.my (duke.void.net.my [202.157.183.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0764043D09; Thu, 11 Dec 2003 13:37:58 -0800 (PST) (envelope-from skywizard@tomoyo.MyBSD.org.my) Received: by tomoyo.MyBSD.org.my (Postfix, from userid 1033) id 234D46CC8E; Fri, 12 Dec 2003 05:38:38 +0800 (MYT) Message-Id: <20031211213838.234D46CC8E@tomoyo.MyBSD.org.my> Date: Fri, 12 Dec 2003 05:38:38 +0800 (MYT) From: Ariff Abdullah To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: sos@FreeBSD.org Subject: kern/60163: ATA failed to mount data track of CD-EXTRA multisession cd X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ariff Abdullah List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2003 21:40:10 -0000 >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: