proc_resetdevice is called with dev->serialize held.
usb_reset_device takes dev->serialize and then calls
__usb_reset_device.  To avoid deadlock, proc_resetdevice
should call __usb_reset_device directly.

Signed-off-by: Duncan Sands <[EMAIL PROTECTED]>

diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c  2004-06-07 10:39:20 +02:00
+++ b/drivers/usb/core/devio.c  2004-06-07 10:39:20 +02:00
@@ -719,7 +719,7 @@
 
 static int proc_resetdevice(struct dev_state *ps)
 {
-       return usb_reset_device(ps->dev);
+       return __usb_reset_device(ps->dev);
 
 }
 
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h       2004-06-07 10:39:20 +02:00
+++ b/include/linux/usb.h       2004-06-07 10:39:20 +02:00
@@ -334,6 +334,7 @@
 
 /* mostly for devices emulating SCSI over USB */
 extern int usb_reset_device(struct usb_device *dev);
+extern int __usb_reset_device(struct usb_device *dev);
 
 extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
 


-------------------------------------------------------
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
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to