From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 14 Feb 2014 18:20:11 +0000 Subject: Re: /dev entry of USB device not disappearing after detach Message-Id: <20140214182011.GE16421@kroah.com> 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 On Fri, Feb 14, 2014 at 07:35:31PM +0200, Valentina Manea wrote: > Hello, > > I am working on a driver for a virtual USB host controller. When I attach a USB > device, everything is fine - sysfs files are created, /dev entry is > created, device is usable. > However, when I detach it, the /dev entry still remains. The sysfs > files are removed, as expected. Obviously, the /dev entry is no longer > usable, e.g. it can't be used for mounting. What /dev entry are you referring to? Did something have it held open while the device was still connected and hasn't closed it yet? > The output from udevmon is here [1]. vhci_hcd is the device representing the > USB hub and 2-1 is the bus ID of the attached device. > > As far as I can tell, udevd receives the remove event but, for some > reason, the /dev entry still remains. How about enabling debugging in the USB core to see what is going on with the device removal path? thanks, greg k-h