Subject: Re: lkm for pci device
To: None <M.Drochner@fz-juelich.de>
From: Nathan J. Williams <firstname.lastname@example.org>
Date: 07/03/2004 17:37:31
Matthias Drochner <M.Drochner@fz-juelich.de> writes:
> If you ask me, pci_find_device() should die completely. It doesn't
> fit into the autoconf framework.
> There is almost everything there to have driver LKMs plug in smoothly.
> In the PCI case, it is just that the bus enumeration code should
> keep track which devices are already handled by drivers (a simple
> bitmask per bus would do it), and that pci_enumerate_bus() could
> be a bit friendlier to LKMs.
Amen. I've been thinking this for a while. It also would make it
possible to detach drivers from devices, even for drivers compiled
into the kernel and non-removable devices.
It seems like what you want for direct-config buses is:
- the bus to track what subdevices have what drivers attached, and
which subdevices have nothing attached.
- a call into the bus to re-run the probe/attach for unattached
devices (or a particular device identifier?)
- a call to cause a driver at a particular device to be detached (for
unloading and trying again).
As you mention, device LKMs need some way to hook into the config