Am Dienstag, 12. August 2003 17:57 schrieb Alan Stern: > On Tue, 12 Aug 2003 [EMAIL PROTECTED] wrote: > > > Now that I mentioned that inserting usb-storage hangs forever > > and then causes a SCSI oops, the question arises how the hang > > is caused. It turns out to be a semaphore deadlock. > > > > What happens is that base/bus.c:bus_add_driver() downs > > down_write(&bus->subsys.rwsem); > > and then later usb/core/hub.c:usb_reset_device() downs > > down_read(&gdev->bus->subsys.rwsem); > > > > This is the same semaphore, and we have a deadlock. > > Is there any reason for that down_read() in hub.c:usb_reset_device()? > There's already another semaphore in place to protect against having more > than one device in the address-0 state. > > Maybe it's an attempt to protect against the "device-morphed" possibility. > I'm planning a re-write of that whole area. For now, it would probably be > okay to remove the down_read() and up_read() in usb_reset_device().
No, it is a guard against probe() which is bound to fail during a reset. Regards Oliver ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel