Commit 606d0900 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: fix xsane breakage, hangs on device scan at launch

Disable a usbfs disconnect() synchronization hack, which recently
started deadlocking because this routine is now called in a different
context.

It shouldn't be needed any longer now that usbcore shuts down endpoints
as part of driver unbinding.  (Except maybe on UHCI, which will have
canceled but not necessarily completed all requests.)
parent 2d0bc3aa
......@@ -339,18 +339,17 @@ static void driver_disconnect(struct usb_interface *intf)
if (!ps)
return;
/* this waits till synchronous requests complete */
down_write (&ps->devsem);
/* NOTE: this relies on usbcore having canceled and completed
* all pending I/O requests; 2.6 does that.
*/
/* prevent new I/O requests */
ps->dev = 0;
ps->ifclaimed = 0;
clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed);
usb_set_intfdata (intf, NULL);
/* force async requests to complete */
destroy_all_async (ps);
up_write (&ps->devsem);
}
struct usb_driver usbdevfs_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment