Commit 06ad5d94 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: unfortunatly, we can't call usb_unlink_urb() right now all of the time.

The host controllers have to be fixed up before we can safely take
out the check for dev->state.
parent b3dca131
...@@ -381,7 +381,16 @@ int usb_submit_urb(struct urb *urb, int mem_flags) ...@@ -381,7 +381,16 @@ int usb_submit_urb(struct urb *urb, int mem_flags)
*/ */
int usb_unlink_urb(struct urb *urb) int usb_unlink_urb(struct urb *urb)
{ {
if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op) /* FIXME
* We should not care about the state here, but the host controllers
* die a horrible death if we submit a urb for a device that has been
* physically removed.
*/
if (urb &&
urb->dev &&
(urb->dev->state >= USB_STATE_DEFAULT) &&
urb->dev->bus &&
urb->dev->bus->op)
return urb->dev->bus->op->unlink_urb(urb); return urb->dev->bus->op->unlink_urb(urb);
else else
return -ENODEV; return -ENODEV;
......
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