ChangeSet 1.1068.7.7, 2003/03/06 15:47:22-08:00, [EMAIL PROTECTED]
[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;
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel