Re: PCI probing

Jeff Garzik (jgarzik@pobox.com)
Wed, 15 Sep 1999 13:11:12 -0400


Bret Indrelee wrote:
> My copy of pci_find_device() from RedHat 6.0 (2.2.5 kernel) doesn't have
> code for PCI_DEV_ANY.

PCI_ANY_ID first appeared in 2.3.x. If this interface were to be used
under older kernels, manual support of the PCI_ANY_ID semantics in
pci_simple_probe() would be needed.

> Since it is table driven, you may want to add an entry for matching by class
> as well.

For the case of pci_simple_probe() I would like to keep it as small as
possible, hopefully only covering the most common cases. Are there many
cases where knowing the class _and_ the device ids is more valuable than
knowing only the device ids?

> What is the value of passing in an array of table entries? I would think the
> normal case is for a driver to only search for one device type.

In my experience one chip may appear on several different boards, so
having a table is very helpful. If you have a single device id, it
would probably be better to call pci_find_xxx() directly.

Thanks for the comments.

Regards,

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/