ChangeSet 1.1119.1.8, 2003/08/06 15:51:41-07:00, david-b@pacbell.net [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. drivers/usb/core/hcd.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c Fri Aug 8 17:05:33 2003 +++ b/drivers/usb/core/hcd.c Fri Aug 8 17:05:33 2003 @@ -1307,7 +1307,8 @@ /* 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