From owner-freebsd-hackers Mon Aug 19 14:04:26 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA16627 for hackers-outgoing; Mon, 19 Aug 1996 14:04:26 -0700 (PDT) Received: from ekeberg.sn.no (ekeberg.sn.no [194.143.8.8]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA16619 for ; Mon, 19 Aug 1996 14:04:20 -0700 (PDT) Received: from oppegard-14.ppp.sn.no (oppegard-14.ppp.sn.no [194.143.100.15]) by ekeberg.sn.no (8.7.5/8.7.3/on4) with SMTP id ; Mon, 19 Aug 1996 23:03:49 +0200 (MET DST) X-Authentication-Warning: ekeberg.sn.no: Host oppegard-14.ppp.sn.no [194.143.100.15] didn't use HELO protocol Message-ID: <32195133.28D@sn.no> Date: Mon, 19 Aug 1996 22:46:27 -0700 From: Arve Ronning X-Mailer: Mozilla 2.0 (Win16; I) MIME-Version: 1.0 To: Bill Paul CC: Jan Knepper <106030.3360@CompuServe.COM>, freebsd-hackers@freebsd.org, arver@sn.no Subject: Re: 2.1.5R & ATAPI CDROM Problems Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jan Knepper wrote: > > Arve Ronning is accused of writing: > > /* Hello FreeBSD world ! > > After installing a Hitachi CDR-7730 ATAPI CDROM drive on my FreeBSD > 2.1.5R box (and verifying that it works under DOS) I discovered a > problem with mounting it :...... */ > > Did, or did you not get the 'modification' of Bill Paul I sent you? > It worked for him, it might work for you! > > Don't worry, be Kneppie, > Jan Thanks Jan, I *did* get your response. It just took me a while to do the actual patching & testing. Following your advice, I send the results to Bill Paul who wrote: > Tonight I blew a few hours playing with the ATAPI support. The result > was the small patch appended to this message, which seems to make the > detection of ATAPI devices happen much more reliably. This patch is > for 2.2-current. So Bill, I applied your patches by hand since I only have 2.1.5R. Hopefully, this is what you would expect : *** wd.c.ori Mon Oct 23 00:14:38 1995 --- wd.c Mon Aug 19 11:36:05 1996 *************** *** 365,371 **** du->dk_error = inb(du->dk_port + wd_error); /* printf("Error (drv 1) : %x\n", du->dk_error); */ ! if(du->dk_error != 0x01) goto nodevice; } else /* drive 0 fail */ goto nodevice; --- 365,371 ---- du->dk_error = inb(du->dk_port + wd_error); /* printf("Error (drv 1) : %x\n", du->dk_error); */ ! if(du->dk_error != 0x01 && du->dk_error != 0x81) /*arve*/ goto nodevice; } else /* drive 0 fail */ goto nodevice; *************** *** 1449,1454 **** --- 1449,1455 ---- return (1); outb(du->dk_port + wd_sdh, WDSD_IBM | (du->dk_unit << 4)); DELAY(5000); /* usually unnecessary; drive select is fast */ + inb(du->dk_port + wd_status); /*arve*/ if ((inb(du->dk_port + wd_status) & (WDCS_BUSY | WDCS_READY)) != WDCS_READY || wdcommand(du, 0, 0, 0, 0, WDCC_RESTORE | WD_STEP) != 0 Compared to the original 2.1.5R kernel this did not change the behaviour of the system at all (which I did not expect it to, except may be the extra inb()) : - The probes still said wdc0 at 0x1f0-0x1f7 irq 14 on isa wdc0: unit 0 (wd0): wd0: 1039MB (2128896 sectors), 2112 cyls, 16 heads, 63 S/T, 512 B/S wdc1 at 0x170-0x177 irq 15 on isa wdc1: unit 0 (wd2): wd2: 204MB (417792 sectors), 1024 cyls, 12 heads, 34 S/T, 512 B/S wdc1: unit 1 (atapi): , removable, iordy wcd0: 689Kb/sec, 128Kb cache, audio play, 128 volume levels, ejectable tray wcd0: medium type unknown, unlocked - doing 'mount_cd9660 /dev/wcd0c /mnt' still responded mount_cd9660: /dev/wcd0c: Device not configured No testing was done on other IDE configurations like removing wd2 (which holds the /var partition; will it boot without /var ?) or moving wcd0 to wdc0 unit 1. The good news is that the patch does not seem to break anything, at least not with my configuration. Although I can't be too sure since I can't mount wcd0. I hope this will serve as a small contribution towards your need for testing the patches. If you want me to try out different IDE configurations, please send some advice on moving /var to wd0. Arve