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

[PATCH] USB: disable both sides of usb device ep0 at once

This eliminates an error case (current cost, memleak) when
disabling endpoints that have control requests queued.
parent 4a110609
......@@ -1307,7 +1307,8 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
/* ignore urbs for other endpoints */
if (usb_pipeendpoint (tmp) != epnum)
continue;
if ((tmp ^ endpoint) & USB_DIR_IN)
/* NOTE assumption that only ep0 is a control endpoint */
if (epnum != 0 && ((tmp ^ endpoint) & USB_DIR_IN))
continue;
/* another cpu may be in hcd, spinning on hcd_data_lock
......
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