From owner-freebsd-questions Wed Sep 13 20:44:56 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA15297 for questions-outgoing; Wed, 13 Sep 1995 20:44:56 -0700 Received: from chrome.onramp.net (chrome.onramp.net [199.1.166.202]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA15290 for ; Wed, 13 Sep 1995 20:44:52 -0700 Received: from localhost.jdl.com (localhost.jdl.com [127.0.0.1]) by chrome.onramp.net (8.6.11/8.6.9) with SMTP id WAA02535; Wed, 13 Sep 1995 22:43:50 -0500 Message-Id: <199509140343.WAA02535@chrome.onramp.net> X-Authentication-Warning: chrome.onramp.net: Host localhost.jdl.com didn't use HELO protocol To: ejon@ll.mit.edu (Eric Jones) cc: questions@FreeBSD.org Subject: Re: ATAPI (or is it IDE) blues In-reply-to: Your message of "Tue, 12 Sep 1995 09:40:39 EDT." <9509120940.AA03550@LL.MIT.EDU> Reply-To: jdl@chromatic.com Clarity-Index: null Threat-Level: none Software-Engineering-Dead-Seriousness: There's no excuse for unreadable code. Net-thought: If you meet the Buddha on the net, put him in your Kill file. Date: Wed, 13 Sep 1995 22:43:50 -0500 From: Jon Loeliger Sender: questions-owner@FreeBSD.org Precedence: bulk Apparently, Eric Jones scribbled: > Greetings, > > I'm trying to get the ATAPI CD-ROM support working with my 2.0.5R > system and have run into a problem. I applied the patches...no problem > with that. The problem is that at boot time, my secondary IDE controller > isn't probed. If it isn't even probed, you might not have it configured into your kernel correctly: controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr disk wd0 at wdc0 drive 0 disk wd1 at wdc0 drive 1 controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr #disk wd2 at wdc1 drive 0 #disk wd3 at wdc1 drive 1 options ATAPI #Enable ATAPI support for IDE bus device wcd0 #IDE CD-ROM It's different if it is being probed, but not recognized. This is known to be a problem. I'm not sure it has been fully resolved yet though. I was able to isolate the problem for me, and have a local hack to make it work. I've got a NEC 260 drive, and this may or may not be your problem too: In wd.c:wdprobe(), there is an attempt to check for a device by reading and writing a register that the (disk) controller responds to, but the CD ROM drive does not. /* check if we have registers that work */ outb(du->dk_port + wd_cyl_lo, 0xa5); /* wd_cyl_lo is read/write */ if (inb(du->dk_port + wd_cyl_lo) == 0xff) /* XXX too weak */ goto nodevice; Now I then did the obvious frob: totally *skip* this weak test. This worked relatively nicely! Bruce supplied some details that I could regurgitate if needed, or you could attempt to locate in the mail archives (Date: 30,31-Aug-95). > Port 2 has Pioneer CD-ROM (which came jumpered as IDE slave... go figure). If it is the only drive there, shouldn't it be jumpered as such? > If I boot w/ -c and probe wdc1 it returns 0x00...no such fella. > What I'd really like to do is get a successful probe in the current > configuration, but I tried a bunch of different things in my attempt to > understand the problem. > First I tried setting CD-ROM to master on the theory that the > port wouldn't probe without a master. Still no probe...DOG doesn't > love my CD-ROM anymore either. > Then I tried moving disk 2 to the second port (making it master, > of course). Now the port is probed and the ATAPI stuff does its work, > but the kernel can't change root devices because now the disk is called > wd2 instead of wd1. So I'm not even sure that the ATAPI code really > found the CD-ROM. You should definitely see something like: wdc1: unit 0 (atapi): , removable, iordy Late? Better than never? jdl