From owner-freebsd-emulation@FreeBSD.ORG Wed Nov 21 13:06:03 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8BCF16A418 for ; Wed, 21 Nov 2007 13:06:03 +0000 (UTC) (envelope-from CQG00620@nifty.ne.jp) Received: from mail.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id 748D313C503 for ; Wed, 21 Nov 2007 13:06:03 +0000 (UTC) (envelope-from CQG00620@nifty.ne.jp) Received: from asahi-net.jp (m036202.ppp.asahi-net.or.jp [219.121.36.202]) by mail.asahi-net.or.jp (Postfix) with ESMTP id 4352F4FC49; Wed, 21 Nov 2007 21:44:59 +0900 (JST) Date: Wed, 21 Nov 2007 21:44:58 +0900 From: Watanabe Kazuhiro To: freebsd-current In-Reply-To: References: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/20.7 (i386--freebsd) MULE/4.1 (AOI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20071121124459.4352F4FC49@mail.asahi-net.or.jp> Cc: Kip Macy , freebsd-emulation@freebsd.org, Juergen Lock Subject: Re: An ATAPI CD-ROM drive doesn't work with 7.0-BETA2, but it works with 7.0-BETA1 and 6.3-BETA1 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 13:06:03 -0000 At Sun, 18 Nov 2007 16:19:58 -0800, Kip Macy wrote: > This is also an issue on parallels. Scott Long and the maintainer are > aware of the issue. I don't know yet how they intend to address it. > > -Kip > > > On Nov 18, 2007 3:08 PM, Juergen Lock wrote: > > > > In article <20071111073940.E35C74AE2D@mail.asahi-net.or.jp> you write: > > >Hi, all. > > > > > >I've tried to install FreeBSD/pc98 7.0-BETA2 to PC-9821Xa9 via FTP. > > >Installation is finished sucessfully. > > >But cannot use the internal ATAPI CD-ROM drive. > > > > > >aries# uname -a > > >FreeBSD aries.sign.local 7.0-BETA2 FreeBSD 7.0-BETA2 #1: Sun Nov 11 00:16:42 > > >JST 2007 nabe@aries.sign.local:/usr/src/sys/pc98/compile/GENERIC pc98 > > >aries# dmesg | grep ^acd > > >acd0: CDROM drive at ata1 as master > > >acd0: read 689KB/s (689KB/s), 256KB buffer, PIO2 > > >acd0: Reads: CDDA stream > > >acd0: Writes: > > >acd0: Audio: play, 256 volume levels > > >acd0: Mechanism: ejectable tray, unlocked > > >acd0: Medium: CD-ROM unknown > > >aries# mount_cd9660 -v /dev/acd0 /mnt > > >could not determine starting sector, using very first session > > >mount_cd9660: /dev/acd0: Input/output error > > >aries# cdcontrol info > > >cdcontrol: /dev/acd0: Input/output error > > >aries# cdcontrol status > > >cdcontrol: /dev/acd0: Input/output error > > >aries# > > > > > >The CD-ROM drive works well with 7.0-BETA1 and 6.3-BETA1. > > > > > >To use the CD-ROM drive with 7.0-BETA2, I have to apply a quick patch > > >described below and recompile the kernel: > > > > > >--- sys/dev/ata/atapi-cd.c.orig 2007-11-01 04:59:53.000000000 +0900 > > >+++ sys/dev/ata/atapi-cd.c 2007-11-11 00:15:21.000000000 +0900 > > >@@ -696,12 +696,16 @@ > > > if (!acd_mode_sense(dev, ATAPI_CDROM_CAP_PAGE, > > > (caddr_t)&cdp->cap, sizeof(cdp->cap)) && > > > cdp->cap.page_code == ATAPI_CDROM_CAP_PAGE) { > > >+#if 0 > > > if ((cdp->cap.medium_type == MST_FMT_NONE) || > > > (cdp->cap.medium_type == MST_NO_DISC) || > > > (cdp->cap.medium_type == MST_DOOR_OPEN) || > > > (cdp->cap.medium_type == MST_FMT_ERROR)) > > > return EIO; > > > else > > >+#else > > >+ printf("cap.medium_type:%d\n", cdp->cap.medium_type); > > >+#endif > > > break; > > > } > > > pause("acdld", hz / 2); > > > > > >The value of cdp->cap.medium_type is 0 (MST_FMT_NONE). > > > > Interesting, I didn't know real hw is also affected... I already > > had to make a patch for qemu that chases these recent commits (atapi-cd.c), > > see my post on -emulation, > > http://lists.freebsd.org/pipermail/freebsd-emulation/2007-November/004178.html > > > > If you want to play with the patch, its also at, > > http://people.freebsd.org/~nox/qemu/patch-hw-ide.c > > (testers especially with non-FreeBSD guests still wanted!) > > > > Thanx, > > Juergen Fixed in 8-current. http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/atapi-cd.c#rev1.195 I've upgraded the PC from 7.0-BETA3 (cannot use the CD-ROM yet) to 8-current (yesterday's source). The CD-ROM drive works fine. aries# uname -a FreeBSD aries.sign.local 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Nov 20 21:16:32 JST 2007 nabe@capricorn:/FreeBSD/obj/pc98/HEAD/pc98 /FreeBSD/HEAD/src/sys/GENERIC pc98 aries# dmesg | grep ^acd acd0: CDROM drive at ata1 as master acd0: read 689KB/s (689KB/s), 256KB buffer, PIO2 acd0: Reads: CDDA stream acd0: Writes: acd0: Audio: play, 256 volume levels acd0: Mechanism: ejectable tray, unlocked acd0: Medium: CD-ROM unknown aries# mount_cd9660 -v /dev/acd0 /mnt using starting sector 0 aries# ls -l /mnt total 57 -r--r--r-- 1 root wheel 25 Oct 8 2002 cdrom.inf -r--r--r-- 1 root wheel 50336 Oct 19 2002 filename.txt dr-xr-xr-x 55 root wheel 8192 Oct 19 2002 packages aries# cdcontrol info Starting track = 1, ending track = 1, TOC size = 18 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 73:36.48 0 331248 data 170 73:38.48 - 331248 - - aries# cdcontrol status Audio status = 21, current track = 1, current position = 0:01.60 Media catalog is inactive Left volume = 255, right volume = 255 aries# I hope to MFC the fix to RELENG_7 and RELENG_6. --- Watanabe Kazuhiro (CQG00620@nifty.ne.jp)