From owner-freebsd-hackers Tue Feb 25 12:26:21 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA13662 for hackers-outgoing; Tue, 25 Feb 1997 12:26:21 -0800 (PST) Received: from Sisyphos.MI.Uni-Koeln.DE (Sisyphos.MI.Uni-Koeln.DE [134.95.212.10]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id MAA13617; Tue, 25 Feb 1997 12:26:03 -0800 (PST) Received: from x14.mi.uni-koeln.de (annexr3-11.slip.Uni-Koeln.DE) by Sisyphos.MI.Uni-Koeln.DE with SMTP id AA23788 (5.67b/IDA-1.5); Tue, 25 Feb 1997 21:23:37 +0100 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.5/8.6.9) id VAA02334; Tue, 25 Feb 1997 21:22:54 +0100 (CET) Message-Id: <19970225212134.FB65465@x14.mi.uni-koeln.de> Date: Tue, 25 Feb 1997 21:21:34 +0100 From: se@freebsd.org (Stefan Esser) To: helbig@mx.ba-stuttgart.de (Wolfgang Helbig) Cc: se@freebsd.org (Stefan Esser), hackers@freebsd.org Subject: Re: CMD640b workaround - final(?) version References: <19970213004131.DV50639@x14.mi.uni-koeln.de> <199702250147.CAA00172@helbig.informatik.ba-stuttgart.de> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 In-Reply-To: <199702250147.CAA00172@helbig.informatik.ba-stuttgart.de>; from Wolfgang Helbig on Feb 25, 1997 02:47:34 +0100 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Feb 25, helbig@MX.BA-Stuttgart.De (Wolfgang Helbig) wrote: > Hi Stefan, > > I changed the code as you suggested. Now pci.c is clean again. Yes, I seem to like that version a lot more than the previous one :) > I added a new source pci/wdc_p.c. It is telling wd.c, which > pci-devices are probed, so wd.c can adapt to different devices. > Up to now only to CMD640b. If there are other IDE-PCI-Chips that > need special treatment, they can be easily detected in wd.c now and > treated accordingly. You choose to move the PCI ID matching code into the ISA driver (as the public function wdi_pci() returning a long device name), but I'm not convinced, that this is the way to go ... Since I'm not going to maintain that code, I won't object, but I'd rather not have any files under /sys/i386/isa, that depends on PCI device IDs ... I see, that you try to get away with only a probe() being defined, and the attach being a NOP. This is in fact possible, but since the probe message line will be completed after the return from the probe, you can't make the IDE driver print any additional messages regarding its configuration ... **** No, you won't get away this way: The DRIVE probe will print additional messages, and those will precede the controller information ... Please consider using a seperate probe() and attach(), using the default switch statement in the probe, as the other drivers do, and have the attach function actually call wdc_pci() ... > I had to add a line in conf/files: > > pci/wdc_p.c optional wdc device-driver > > For review, I include the source of wdc_p.c. > If you think it's okay now, I will post a diff-file for wd.c, > so kern/2305 can be closed. You can send me a context diff, and I'll import it into -current. But please reconsider the probe message issues I pointed out above! Regards, STefan