Date: Sun, 28 Jan 2001 10:55:13 +0900 From: Motomichi Matsuzaki <mzaki@e-mail.ne.jp> To: current@freebsd.org Cc: sos@freebsd.org Subject: CD Extra disks on atapi-cd Message-ID: <864rykphj2.wl@tkc.att.ne.jp>
next in thread | raw e-mail | index | archive | help
Hi. I've found that -current kernel couldn't mount CD-Extra disks on ATAPI CD drives. For example: Starting track = 1, ending track = 14, TOC size = 122 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 0:11.52 0 727 audio 2 0:11.52 3:58.55 727 17755 audio 3 4:08.32 2:15.55 18482 10030 audio 4 6:22.12 3:10.50 28512 14150 audio 5 9:30.62 3:02.13 42662 13513 audio 6 12:31.00 2:54.00 56175 12900 audio 7 15:23.00 3:50.40 69075 17140 audio 8 19:11.40 2:59.12 86215 13287 audio 9 22:08.52 3:04.30 99502 13680 audio 10 25:11.07 2:06.05 113182 9305 audio 11 27:15.12 2:54.35 122487 12935 audio 12 30:07.47 3:17.13 135422 14638 audio 13 33:22.60 12:53.27 150060 57852 audio 14 46:14.12 20:50.58 207912 93658 data 170 67:02.70 - 301570 - - Tracks 1-13 are normal CD-DA in the first session, and track 14 is the ISO9660 filesystem which consists of XA Mode 2 Form 1 sectors (2048bytes/sector) in the second session. This disk can be mounted on my SCSI CD drive, but not on my ATAPI CD drive (with EINVAL). I applied the following patch, and then I can successfully mount the disk. Is this a right treatment? --- sys/dev/ata/atapi-cd.c Fri Jan 19 06:01:25 2001 +++ sys/dev/ata/atapi-cd.c.new Sun Jan 28 08:15:37 2001 @@ -1227,7 +1227,7 @@ static void acd_read_toc(struct acd_softc *cdp) { - int ntracks, len; + int ntracks, len, t; int8_t ccb[16]; bzero(&cdp->toc, sizeof(cdp->toc)); @@ -1275,7 +1275,14 @@ cdp->info.volsize = ntohl(cdp->info.volsize); cdp->info.blksize = ntohl(cdp->info.blksize); - cdp->block_size = (cdp->toc.tab[0].control & 4) ? 2048 : 2352; + + cdp->block_size = 2352; + for (t = 0; t < cdp->toc.hdr.ending_track; t++) { + if (cdp->toc.tab[t].control & 4) { + cdp->block_size = 2048; + break; + } + } bzero(&cdp->disklabel, sizeof(struct disklabel)); strncpy(cdp->disklabel.d_typename, " ", -- Motomichi Matsuzaki <mzaki@e-mail.ne.jp> Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?864rykphj2.wl>