svn commit: r192051 - head/sys/dev/usb
Andrew Thompson
thompsa at FreeBSD.org
Wed May 13 17:58:38 UTC 2009
Author: thompsa
Date: Wed May 13 17:58:37 2009
New Revision: 192051
URL: http://svn.freebsd.org/changeset/base/192051
Log:
The transfer must return USB_ERR_CANCELLED when the device is gone due to the
way usb drivers work.
Submitted by: Hans Petter Selasky
Modified:
head/sys/dev/usb/usb_transfer.c
Modified: head/sys/dev/usb/usb_transfer.c
==============================================================================
--- head/sys/dev/usb/usb_transfer.c Wed May 13 17:53:04 2009 (r192050)
+++ head/sys/dev/usb/usb_transfer.c Wed May 13 17:58:37 2009 (r192051)
@@ -1439,7 +1439,11 @@ usb2_start_hardware(struct usb2_xfer *xf
/* Check if the device is still alive */
if (info->udev->state < USB_STATE_POWERED) {
USB_BUS_LOCK(bus);
- usb2_transfer_done(xfer, USB_ERR_NOT_CONFIGURED);
+ /*
+ * Must return cancelled error code else
+ * device drivers can hang.
+ */
+ usb2_transfer_done(xfer, USB_ERR_CANCELLED);
USB_BUS_UNLOCK(bus);
return;
}
More information about the svn-src-head
mailing list