Re: [RFC] [PATCH] Device removal callback

From: Greg KH (greg@kroah.com)
Date: Mon Mar 10 2003 - 12:21:55 EST


On Mon, Mar 10, 2003 at 11:55:48AM -0500, Ben Collins wrote:
> > I much prefer this, as I would like to see it eventually, but I'd rather
> > see the implications worked out before it's generalized.
>
> Then I have to be concerned about parts of the driver model removing
> parents of my devices without my knowing it. Didn't PCI already go
> through this problem with bus's being removed?

Not that I know of, no. The PCI core knows when it is removing busses,
as it is the one doing this.

> If my PCI devices gets removed, it simply calls my PCI callbacks, but
> then my PCI drivers have to link into the core and call remove on all
> the host devices, then node devices, then unit directories.

Um, don't you have to do this already today, if someone unloads your pci
driver? I don't see what the driver core has to do with that.

> I'm not sure what the problem is in allowing the bus driver to know when
> a device is about to be removed for some reason. At the very least it
> makes for a good sanity check mechanism.

As the bus driver was the one who asked for the device to go away in the
first place, why isn't this just extra information?

Still confused,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:22 EST