On Sat, Jan 03, 2004 at 03:24:56PM -0700, Justin T. Gibbs wrote: > > well in 2.6 modules are supposed to remain loaded even though no device > > is found (since one can be hotplugged later) so that part of the driver > > needs changing; other than that yes the driver needs to deregister > > itself.... > > Is this policy change documented somewhere? Documentation/pci.txt has it (albeit not extremely explicit): 0. Structure of PCI drivers ~~~~~~~~~~~~~~~~~~~~~~~~~~ There exist two kinds of PCI drivers: new-style ones (which leave most of probing for devices to the PCI layer and support online insertion and removal of devices [thus supporting PCI, hot-pluggable PCI and CardBus in a single driver]) 1. New-style drivers ~~~~~~~~~~~~~~~~~~~ The new-style drivers just call pci_register_driver during their initialization with a pointer to a structure describing the driver (struct pci_driver) which contains: probe Pointer to a probing function which gets called (during execution of pci_register_driver for already existing devices or later if a new device gets inserted) for all PCI devices which match the ID table and are not handled by the other drivers yet. This function gets passed a pointer to the pci_dev structure representing the device and also which entry in the ID table did the device match. It returns zero when the driver has accepted the device or an error code (negative number) otherwise. This function always gets called from process context, so it can sleep. ----------------- There are 2 reasons to work this way, and I would very much prefer the adaptec drivers to behave like this: 1) PCI Hotplugging 2) Adding PCI ID's at runtime While you may not care about 1), a lot of IHV/distros care about 2); eg if Adaptec puts out a card that can be driven by aic79xx but with just a new PCI ID, hardware vendors can just add the ID at runtime and have it work in the (factory) installer etc but only *if the driver is loaded* .... Greetings, Arjan van de Ven