Date: Wed, 13 May 2009 17:58:37 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192051 - head/sys/dev/usb Message-ID: <200905131758.n4DHwbsF063225@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905131758.n4DHwbsF063225>