Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2010 16:20:49 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 181840 for review
Message-ID:  <201008041620.o74GKndD011544@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@181840?ac=10

Change 181840 by hselasky@hselasky_laptop001 on 2010/08/04 16:20:04

	USB core (HUB):
		- program the U1/U2 port timeouts after we know the port speed.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_hub.c#53 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/usb_hub.c#53 (text+ko) ====

@@ -472,6 +472,23 @@
 		speed = udev->speed;
 		break;
 	}
+	if (speed == USB_SPEED_HIGH) {
+		err = usbd_req_set_hub_u1_timeout(udev, NULL,
+		    portno, 128 - (2 * udev->depth));
+		if (err) {
+			DPRINTFN(0, "port %d U1 timeout "
+			    "failed, error=%s\n",
+			    portno, usbd_errstr(err));
+		}
+		err = usbd_req_set_hub_u2_timeout(udev, NULL,
+		    portno, 128 - (2 * udev->depth));
+		if (err) {
+			DPRINTFN(0, "port %d U2 timeout "
+			    "failed, error=%s\n",
+			    portno, usbd_errstr(err));
+		}
+	}
+
 	/*
 	 * Figure out the device mode
 	 *
@@ -1025,14 +1042,6 @@
 				removable++;
 			break;
 		case USB_SPEED_SUPER:
-			if (!err) {
-				err = usbd_req_set_hub_u1_timeout(udev, NULL,
-				    portno, 128 - (2 * udev->depth));
-			}
-			if (!err) {
-				err = usbd_req_set_hub_u2_timeout(udev, NULL,
-				    portno, 128 - (2 * udev->depth));
-			}
 			if (!UHD_NOT_REMOV(&hubdesc30, portno))
 				removable++;
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008041620.o74GKndD011544>