generic pci device_probe routine ?

Luigi Rizzo rizzo at iet.unipi.it
Mon Dec 19 18:48:58 UTC 2011


On Mon, Dec 19, 2011 at 11:35:47AM -0700, Warner Losh wrote:
> 
> On Dec 19, 2011, at 11:14 AM, Luigi Rizzo wrote:
> > haven't done device drivers for a while, but i just noticed that
> > pretty much all PCI drivers have their own replica of the *_probe code
> > which does the same exact thing -- define an array of vendor,product
> > entries, and lookup the entry in the array.
> > Would it make sense (or, do we have already) to have common struct
> > and routine, similar to what we have in usb_lookup.c ?
> 
> It would make sense.  Model it after the PC Card one, however, since that one also include the size of the elements to allow for piggybacking data for the driver in the table.

yes, i was thinking of that too.

cheers
luigi
> It is the biggest stumbling block to allowing automated driver loading today.
> 
> Warner
> 


More information about the freebsd-arch mailing list