Re: 2.4.2 yenta_socket problems on ThinkPad 240

Albert D. Cahalan
2001-06-17T04:04:25Z

Alan Cox writes:
> [lost]

>> I would love to just define it unconditionally for x86, but I
>> believe Martin said that causes problems with some hardware, and
>> the way the BIOS has set up that hardware. (details anyone?)
>
> Im not sure unconditionally is wise. However turning it into a
> routine that walks the PCI bus tree and returns 1 if a duplicate
> is found seems to be a little bit less likely to cause suprises

That could hurt.

I have a device that can serve as a bridge, and also as a
network card. Sometimes the bridge feature is not used, so
the bus numbers get set to 0xfd, 0xfe, 0xff or just all 0xff.
Multiple cards get the same values just to keep them out of
the way.

(this is a PCI-over-network thing)

Depending on EEPROM config data, it might not have a bridge
class code at boot. It has to be turned into a bridge via config
space writes though, so that the network feature will work.
This means I need to allocate some bus numbers after boot,
perhaps renumbering other bridges to make room. (BTW if there
is an API for this that I missed, please let me know)

In case I do want to really use the bridge feature, there is
a little bug to deal with. The primary bus number must be set
equal to the secondary bus number. No problem I hope?

Right now Linux seems happy, with lspci complaining a bit.

If the generic code were to "fix" my bus number assignment,
all Hell would break loose.