Comment 25 for bug 8509

Revision history for this message
Andres Salomon (dilinger-deactivatedaccount) wrote :

The reason why the (pci) drivers require ide-generic to load is because they
don't actually register w/ the pci subsystem. Most pci drivers will call
pci_register_driver(), which allows the pci subsystem to check the pci bus for
the devices that the driver can handle, and call the driver's probe callback.
Instead, what the ide pci drivers do is call ide_pci_register_driver(); this
allows the ide subsystem to keep a local list of all ide drivers, and then
register the ide drivers w/ the pci subsystem once ide-generic is loaded. This
is done so that ordering of drivers is done; individual ide controller drivers
get priority for devices, and if a driver is not found for a controller, the
generic ide driver is used.

In the code; ide-generic calls ide_scan_pcibus, which first scans for devices in
need of an ide driver (ide_scan_pcidev), and then registers each driver w/ the
pci subsystem. Bartlomiej Zolnierkiewicz has posted some interesting patches to
lkml (http://thread.gmane.org/gmane.linux.ide/2974) which may end up being the
proper way to solve this problem. I will play w/ it a bit and see how it goes.