From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brad Hards Date: Sat, 31 Mar 2001 01:00:26 +0000 Subject: Re: (remove) event not supported. Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org David Brownell wrote: > > > Mar 30 08:07:01 localhost /etc/hotplug/usb.agent: USB remove event not supported > > > > What are the issues associated with it. Is this something that just > > hasn't been coded up or is it something that can't be coded up. > > Awkward to code up. What one really wants to happen is have > the device's module removed ... and _maybe_ some driver-specific > action (not that I can think of any examples just now). But: umounting a storage device? Or does that happen automatically? I am not going to pull out a mounted zip drive to find out... > - the dynamic linking framework doesn't track how many devices > are attached to each driver module ... so if there's another device > controlled by the same driver, but it's not opened, removing that > module would be incorrect. ("module use count" doesn't cover > uses, just opens.) This could be trivially extended to have a inc_dev_open_count() and inc_dev_use_count(), where the use count get incremented in probe() and the open count gets incremented in open(). Naturally you also have to have a dec version of each as well, in disconnect() and close(). > - nothing's tracking which modules are used with which device, > and if the device is gone you can't query it to find that out! maybe the driver could have a list of devices? not so easy to implement though. Brad _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel