ChangeSet 1.1068.7.7, 2003/03/06 15:47:22-08:00, greg@kroah.com [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. drivers/usb/core/urb.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c --- a/drivers/usb/core/urb.c Thu Mar 6 16:07:52 2003 +++ b/drivers/usb/core/urb.c Thu Mar 6 16:07:52 2003 @@ -381,7 +381,16 @@ */ 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); else return -ENODEV;