Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 1997 19:34:32 +0200
From:      Stefan Esser <se@freebsd.org>
To:        dennis <dennis@etinc.com>
Cc:        "Daniel O'Callaghan" <danny@panda.hilink.com.au>, hackers@freebsd.org
Subject:   Re: Probing deflugalty
Message-ID:  <19970418193432.02048@x14.mi.uni-koeln.de>
In-Reply-To: <3.0.32.19970418130338.00b573f0@etinc.com>; from dennis on Fri, Apr 18, 1997 at 01:03:40PM -0400
References:  <3.0.32.19970418130338.00b573f0@etinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 18, dennis <dennis@etinc.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970418193432.02048>