ChangeSet 1.1119.1.8, 2003/08/06 15:51:41-07:00, [EMAIL PROTECTED] [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 ------------------------------------------------------- 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