Trying to remove cardbus dependence on ds
Russell King
rmk at arm.linux.org.uk
Tue Jun 17 23:45:09 BST 2003
On Tue, Jun 17, 2003 at 01:04:25PM -0700, Patrick Mochel wrote:
>
> On Tue, 17 Jun 2003, Matthew Wilcox wrote:
>
> > On Tue, Jun 17, 2003 at 08:17:01PM +0100, Russell King wrote:
> > > So, we can't call other pci device add/remove functions from within a
> > > driver probe/remove callback.
> >
> > Or we make the semaphore per-bus rather than per-bus-type. New races?
> > Probably. Or we have an _unlocked() form of the operation that's currently
> > being called.
>
> There should be: device_detach() and driver_detach() in drivers/base/bus.c
> were exported for reasons just like this.
I'm assuming you mean device_release_driver() rather than driver_detach()
which isn't exported.
This should allow us to detach drivers from the device. However, I
don't think it helps us subsequently destroy them. When the socket
driver is unloaded, we need to walk the subordinate pci devices telling
the drivers that they have gone and releasing all resources including
the struct device.
Even if we remove all drivers from a device, we will still take the
bus rwsem when we come to remove the device via bus_remove_device.
So yes, it gives is part of a solution, but unfortunately not the whole
solution.
--
Russell King (rmk at arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
More information about the linux-pcmcia
mailing list