From owner-freebsd-hackers Fri Apr 18 10:39:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA20641 for hackers-outgoing; Fri, 18 Apr 1997 10:39:05 -0700 (PDT) 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 KAA20630 for ; Fri, 18 Apr 1997 10:39:01 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-9.slip.Uni-Koeln.DE) by Sisyphos.MI.Uni-Koeln.DE with SMTP id AA04493 (5.67b/IDA-1.5 for ); Fri, 18 Apr 1997 19:38:13 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.5/8.6.9) id TAA09187; Fri, 18 Apr 1997 19:34:32 +0200 (CEST) Message-Id: <19970418193432.02048@x14.mi.uni-koeln.de> Date: Fri, 18 Apr 1997 19:34:32 +0200 From: Stefan Esser To: dennis Cc: "Daniel O'Callaghan" , hackers@freebsd.org Subject: Re: Probing deflugalty References: <3.0.32.19970418130338.00b573f0@etinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.68 In-Reply-To: <3.0.32.19970418130338.00b573f0@etinc.com>; from dennis on Fri, Apr 18, 1997 at 01:03:40PM -0400 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Apr 18, dennis wrote: > The problem is that if a xyz0 PCI card is found and attached at > xyz0, then the isa code should not probe xyz0...the isa probe > will not find the PCI card because the probe code is different..... > If there is an isa card at the xyz probe address, it will try to attach > is again at xyz0...and you cant have 2 devices using the same interface.... If your kernel is configured to support an ISA card under the name of "xyz0", then that name should never be assigned to a (possibly driver compatible) PCI card, whether that ISA card is plugged into the system or not. The only exception is that you wire the unit number of some PCI card to "0", but then the ISA probe code should not even probe the card it might have a "device cyz0" config line for ... > You are telling me that you can't tell that device xyz0 already > exists before you probe? C'mon now! What about ifunit()? Yes, this could be implemented as an additional conflicts check, but it must be put in all existing ISA drivers (or at least in those that are shared between PCI and ISA). > >4) check for ressource conflicts with cards on other > > bus types (and protect against an ISA driver trying > > to attach a PCI card, that has already been found > > by its PCI driver ...) > > It would be pretty hard for this to happen, given that PCI > io addresses are out of ISA range. Memory is an issue though, > if the PCI card memory is in the ISA hole..... No, you can have both, an ISA card below 1MB (remember, there is even a map type defined for that purpose !) as well as a PCI card supported by an ISA driver, but with an attach address far outside the ISA hole ... (The latter method is used to support the "lnc" and "ed" drivers under 2.1.x, where some kernel interface was not well suited to allow backporting the 2.2.x PCI support code for those drivers ... If you move a 2.1.x kernel config file over to 2.2.x and have a line reading device lnc0 at isa? port 0x7000 in it (since you found that to be the address assigned to your PCI Lance card by the PCI BIOS), then both the PCI and ISA code would try to attach that card, currently! The code was written under the assumption you state above, but that assumption did not hold in reality :) Regards, STefan