svn commit: r216249 - head/sys/dev/usb

Hans Petter Selasky hselasky at FreeBSD.org
Tue Dec 7 08:20:21 UTC 2010


Author: hselasky
Date: Tue Dec  7 08:20:20 2010
New Revision: 216249
URL: http://svn.freebsd.org/changeset/base/216249

Log:
  Re-add a status check which sneaked out during r214804.
  This change can fix some USB error messages showing up
  during bootup.
  
  MFC after:	3 days
  Approved by:	thompsa (mentor)

Modified:
  head/sys/dev/usb/usb_request.c

Modified: head/sys/dev/usb/usb_request.c
==============================================================================
--- head/sys/dev/usb/usb_request.c	Tue Dec  7 03:29:36 2010	(r216248)
+++ head/sys/dev/usb/usb_request.c	Tue Dec  7 08:20:20 2010	(r216249)
@@ -793,6 +793,10 @@ usbd_req_reset_port(struct usb_device *u
 		if (err) {
 			goto done;
 		}
+		/* if the device disappeared, just give up */
+		if (!(UGETW(ps.wPortStatus) & UPS_CURRENT_CONNECT_STATUS)) {
+			goto done;
+		}
 		/* check if reset is complete */
 		if (UGETW(ps.wPortChange) & UPS_C_PORT_RESET) {
 			break;


More information about the svn-src-head mailing list