RE: PCI probing

Bret Indrelee (breti@bit3.com)
Wed, 15 Sep 1999 10:50:23 -0500


If I'm understanding the code correctly, you create a table for the device
and then call the pci_simple_probe() routine. Each match, it calls the
defined callback.

The callback includes two opaque types, the third parameter is what was
passed into pci_simple_probe() and the last parameter from the table used by
the probe routine.

Comments:

My copy of pci_find_device() from RedHat 6.0 (2.2.5 kernel) doesn't have
code for PCI_DEV_ANY. It appears to me that it requires an exact match of
PCI vendor and device ID. Your code just calls pci_find_device(), so I don't
see how it will allow matchs where either of these were PCI_DEV_ANY.

Do later versions of pci_find_device() allow this, or is it an oversight?

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

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.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity

Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------

-
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/