From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sat, 31 Mar 2001 15:02:42 +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 > > > 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... There we go, the example I knew was lurking! Likewise shutting down printer queues. > > - 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(). I'd hate to change the semantics of the "use" count (which is really used as "open" count) ... but yes, adding another "driver count" is conceptually straightforward. Packaging it (and documenting it) would likely be a 2.5 issue. > > - 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. Most such drivers DO have a list of devices, but I shudder to think of updating each one to publish it in some idiosyncratic format somewhere in /proc ... best to fix this just once, for all drivers. - Dave _______________________________________________ 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