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

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19FB5614-B70A-4FDB-A7ED-73A7B5C5970C>