From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Fri, 05 Oct 2001 07:13:15 +0000 Subject: Re: Unloading drivers, start-up, shut-down and a rewrite (a problem) 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 Quoting David Hinds: > Just so you know, and not saying whether it is a better or worse > solution, the way PCMCIA drivers handle this, is that there's a > separate interface, /proc/bus/pccard/drivers, that has "use counts" > for PCMCIA drivers that indicate how many physical devices are > currently associated with each driver. These use counts are > independent of the regular module use counts. And FWIW, when I've thought of how to solve this "driver unload" problem in a clean way that improves user-friendliness, that's just what I end up wanting: a devices-per-driver count that's distinct from the existing uses-per-driver refcount. It's late, so don't hold me to this, but I think adding that is probably sufficient for user-mode policy decisions. Hotplugging would by default consider the device-per-driver count when seeing if it's OK to unload a driver module. Likely "rmmod" needs a flag that says whether the device count is ignored, as (effectively) done today. Driver developers will want the flexibility to say "remove this driver even though there's hardware attached, I've got a bugfix". USB developers work in that mode today, it's quite handy. - Dave _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel