Date: Thu, 8 Aug 1996 00:08:47 -0400 (EDT) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: current@freebsd.org Subject: ATAPI CD-ROM fun Message-ID: <199608080408.AAA20007@skynet.ctr.columbia.edu>
next in thread | raw e-mail | index | archive | help
We recently got in a batch of Gateway 2000 200Mhz Pentium machines with IDE CD-ROMs (Toshiba 8x). These are apparently slated to become dual-boot Windoze NT and Linux (*spit*) machines, though I'm doing my best to campaign for FreeBSD (there are unusual circumstances: they have plans to do some work with wireless network devices which have sample drivers only for Linux (and which aren't freely available) -- I've offered to port them to FreeBSD myself just so I won't have to deal with Linux). Anyway. I did some tests with FreeBSD on these machines and I ran across some interesting things: - FreeBSD 2.1.5-RELEASE doesn't seem to want anything to do with the CD-ROM though FreeBSD 2.2-SNAP (most recent one) likes it just fine (though see below for caveats). - The 3c509B UTP-only ethernet cards wedge up after a few seconds of activity with FreeBSD 2.1.5-RELEASE but work find with 2.2-SNAP. But that's neither here nor there. - The machines came with the IDE CD-ROMs jumpered as master devices on the secondary IDE controller. 2.2-SNAP failed to recognize the CD-ROM in this case, however if I rejumpered the drives to slaves, they were detected and worked perfectly once I put together a custom kernel with the right configuration. - The GENERIC kernel (and the kernel on the boot floppy) in the SNAP causes sysinstall to get mightily confused due to the following peculiar behavior: with the CD-ROM jumpered as a slave, the wd driver falsely detects an IDE hard drive at unit 0 on the secondary controller in addition to the ATAPI CD-ROM drive. This means you have a fictional wd2 with bogus geometry values (in my case they were the BIOS values for the real IDE drive at unit 0 on the primary controller). Curiously enough, the system will continue to function in this state and the CD-ROM will even work. However, sysinstall wedges when it goes looking for devices because attempting to access the fictitious wd2 device doesn't work. It's not really fair to blame sysinstall for this bug since it has no easy way to tell that the device is bogus. Unfortunately, userconfig doesn't offer a way to disable individual drives so you have to disable the whole controller in order to get to the install menu. The wd driver should be smarter about this. - After some tinkering I was finally able to get the 2.2-SNAP kernel to recognize the CD-ROM when it was jumpered as a master device. The problem seems to be tha wdprobe() is erroring out unnecessarily. I did a gross hack wherein I forced the probe to return success if the check for an ATAPI master device succeeded. It seems that the probe can detect the ATAPI signature of the master device, but a later part of wdprobe() fails which causes the device to be incorrectly skipped. I think that part that's failing is immediately after the ATAPI signature checks, where it tries to send a WDC_DIAGNOSE command to the controller. I need to play with this a bit more though. As if I don't already have enough to do. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you." =============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608080408.AAA20007>