Index: usb-devel/drivers/usb/core/urb.c =================================================================== --- usb-devel.orig/drivers/usb/core/urb.c +++ usb-devel/drivers/usb/core/urb.c @@ -204,8 +204,17 @@ int usb_urb_ep_type_check(const struct u const struct usb_host_endpoint *ep; ep = usb_pipe_endpoint(urb->dev, urb->pipe); - if (!ep) - return -EINVAL; + if (!ep) { + /* + * Special case: The pointers for ep0 are temporarily cleared + * during device resets. We won't count this as an error; + * drivers can reasonably expect that ep0 always exists. + */ + if (usb_pipeendpoint(urb->pipe) == 0) + ep = &urb->dev->ep0; + else + return -EINVAL; + } if (usb_pipetype(urb->pipe) != pipetypes[usb_endpoint_type(&ep->desc)]) return -EINVAL; return 0;