Date: Fri, 18 Apr 1997 13:03:40 -0400 From: dennis <dennis@etinc.com> To: Stefan Esser <se@freebsd.org> Cc: "Daniel O'Callaghan" <danny@panda.hilink.com.au>, hackers@freebsd.org Subject: Re: Probing deflugalty Message-ID: <3.0.32.19970418130338.00b573f0@etinc.com>
next in thread | raw e-mail | index | archive | help
At 06:43 PM 4/18/97 +0200, Stefan Esser wrote: >On Apr 17, dennis <dennis@etinc.com> wrote: >> >On Thu, 17 Apr 1997, dennis wrote: > >> >> With the following configuration: >> >> >> >> device dev0 >> >> device dev0 at isa? port 0x300 >> >> >> >> If a PCI device is found, the ISA dev0 really shouldn't be probed, but >> >> it is. > >> My point here was that if ed0 is already attached that additional ed0 >> probes should not be done.... > >Sorry, but I still don't understand what you actually >dislike about the current situation ... > >Is it: > >1) Only ed0 is specified in the kernel config file, and > you do not want an additional PCI card to be attched > as ed1 ? > >2) You have a PCI card at some address assigned by the > PCI BIOS, and have also specified the attach address > in the kernel config file (or in userconfig), and now > both the PCI and the ISA attach code find the card > and try to attach it ? > >The first one is a feature, actually :) >You need only have some driver included in the kernel >(or loaded as an LKM), and it will attach all cards that >it knows about. > >The second one is the result of the PCI code and the ISA >code not having a common ressource list. There is no way >to detect the conflict, in that case. (The current ressource >registration code is ISA specific, and will have to be >generalized to support multiple port and memory ranges, >for example.) 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.... You are telling me that you can't tell that device xyz0 already exists before you probe? C'mon now! What about ifunit()? > >I plan to fix both these points in the PCI code. Some >recent discussion with Jörg Wunsch made me rethink the >PCI attach procedure, and I want to implement changes, >that allow you to: > >1) wire driver names to cards in specified PCI slots this is a good thing... > >2) allow "userconfig" to attach a unit number to a > PCI device good... > >3) allow "userconfig" to disable a PCI device > >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..... > >The config file format would be: > ># PCI bus tree >controller pci0 >controller pci1 at pci0 slot 5 >controller pci2 at pci0 slot 6 > ># Adaptec 3940 in slot 5 >device ahc0 at pci1 slot 0 >device ahc1 at pci1 slot 1 > ># AMD Combo chip on motherboard >device lnc0 at pci0 slot 7 func 0 >device amd0 at pci0 slot 7 func 0 > >This does of course require changes to "config", but >they are not hard to implement. > >The semantics of the above definitions would be, that >an Adaptec 3940 in slot 5 would actually get the ahc0 >and ahc1 driver instances assigned. If there was no >such card, but an 2940 in slot 5, then that would come >out as ahc2, since ahc0 and ahc1 are reserved for the >3940 and will only be used for such a card in slot 5. > >There is one problem left, but I'm going to ignore that: >The PCI bus numbers used in the config file are only >used as labels, they don't have to match what the PCI >BIOS assigns. It is well possible, that the PCI BIOS >chooses to assign PCI bus 2 to the secondary side of >the PCI bridge in slot 5, and thus "pci1" in the config >file is just a label for the "at pci1" clause ... >(In other words: pci99 substituted for all occurances >of pci1 in the config file would give indistinguishable >behaviour, and would not imply, that the card will really >be found on a PCI bus with a bus number of 99.) > >I'll implement this as time permits, together with other >necessary PCI bus driver changes. Nice work. Its fairly clean now...and you seem to be focused on the right issues... Dennis
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19970418130338.00b573f0>