generic pci device_probe routine ?
Warner Losh
imp at bsdimp.com
Mon Dec 19 18:43:56 UTC 2011
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.
It is the biggest stumbling block to allowing automated driver loading today.
Warner
More information about the freebsd-arch
mailing list