Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2011 20:05:24 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Warner Losh <imp@bsdimp.com>
Cc:        arch@FreeBSD.org
Subject:   Re: generic pci device_probe routine ?
Message-ID:  <20111219190524.GA14261@onelab2.iet.unipi.it>
In-Reply-To: <19FB5614-B70A-4FDB-A7ED-73A7B5C5970C@bsdimp.com>
References:  <20111219181410.GA13742@onelab2.iet.unipi.it> <19FB5614-B70A-4FDB-A7ED-73A7B5C5970C@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111219190524.GA14261>