From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Fri, 04 Jun 2004 03:58:23 +0000 Subject: Re: hotplug remove vs. device driver close Message-Id: <1086321503.1838.62.camel@gaston> List-Id: References: <20040602181455.C17544@forte.austin.ibm.com> In-Reply-To: <20040602181455.C17544@forte.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, 2004-06-04 at 05:39, linas@austin.ibm.com wrote: > On Thu, Jun 03, 2004 at 12:23:04PM -0700, Don Fry wrote: > > > > The pcnet32 driver tries to do the 'right thing' when it reads 0xffff, > > but that does not include doing a 'close' prior to being removed. The > > driver could keep some state around so that if its remove routine was > > called without close first, it would cleanup, but I don't know of any > > network driver that does this. > > What I get out of this thread is that pcnet32, and in fact, all drivers, > should keep sufficient state around so that close() can be called either > after or before remove(). I think the problem is more specific to the netdev interface no ? Isn't it just that unregister_netdevice fails when it's open ? In which case, remove should fail ... which may not be what you want, but I don't see a proper solution unless we fix the network core. Hrm... looking at the code, unregister_netdevice is supposed to do a close... Maybe something isn't working properly there... Ben. ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ 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