[syslinux] [PATCH] pci: Introduce slot and function information

H. Peter Anvin hpa at zytor.com
Sun Jul 13 17:59:53 PDT 2008


Sebastian Herbszt wrote:
> Introduce slot and function information to pci_device and fill them in pci_scan().

Hm.  I started digging into this, and it's pretty clear we have a 
serious problem.

I was originally going to propose that if we're going to have the device 
address in there, we should include either the bus number or a back 
pointer to the bus.

However, the worse problem is that we use a fixed size for the 
pci_device[] array of MAX_PCI_DEVICES, but then we populate the array 
with *functions*, and there can be MAX_PCI_DEVICES*MAX_PCI_FUNC (256) of 
those.

Given that, I'm thinking that we should do one of two things: either 
retain the fixed-sized arrays, but size them appropriately, *and* just 
make the array slot used strictly based on device address (i.e. dev:func 
in this case) -- in that case, there is no need to store any of that -- 
   or use dynamically allocated linked lists.

What do you think?

	-hpa




More information about the Syslinux mailing list