[Soekris] net4801 and linux
M. Warner Losh
imp at bsdimp.com
Fri Aug 1 14:56:22 UTC 2003
In message: <3F2A7777.9030302 at tenebras.com>
Michael Sierchio <kudzu at tenebras.com> writes:
: M. Warner Losh wrote:
: > I just got done adding some code in FreeBSD for this problem.
: > When enumerating pci bus, you must read the header at offset 0x0e,
: > which contains the header type. If you don't know what it is, skip
: > it. In FreeBSD, we only grok 0, 1 and 2 header types, so we ignore
: > all devices that don't have these types.
: > Accorrding to the standards docs that I've been pointed at, the header
: > byte is the only byte that's guarnateed to be readable. Not even the
: > vendor word is guaranteed, or so some people read the standard.
: The patch suggested here
: is wrong, then?
Yes. It will basically work, but there's a better patch.
==== //depot/user/imp/newcard/i386/pci/pci_bus.c#14 - /dell/imp/p4/newcard/src/sys/i386/pci/pci_bus.c ====
@@ -323,6 +323,8 @@
func = 0;
hdrtype = legacy_pcib_read_config(0, bus, slot, func,
+ if ((hdrtype & ~PCIM_MFDEV) > 2)
if ((hdrtype & PCIM_MFDEV) &&
(!found_orion || hdrtype != 0xff))
pcifunchigh = 7;
More information about the Soekris-tech