svn commit: r365965 - stable/11/sys/dev/usb

Hans Petter Selasky hselasky at FreeBSD.org
Mon Sep 21 18:28:23 UTC 2020


Author: hselasky
Date: Mon Sep 21 18:28:23 2020
New Revision: 365965
URL: https://svnweb.freebsd.org/changeset/base/365965

Log:
  MFC r364932:
  Allow slow USB devices to be given more time to return their USB descriptors,
  like Logitech HD Pro Webcam C920.
  
  PR:		248926
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/dev/usb/usb_request.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/usb_request.c
==============================================================================
--- stable/11/sys/dev/usb/usb_request.c	Mon Sep 21 18:27:44 2020	(r365964)
+++ stable/11/sys/dev/usb/usb_request.c	Mon Sep 21 18:28:23 2020	(r365965)
@@ -719,7 +719,8 @@ done:
 	case USB_ERR_CANCELLED:
 		break;
 	default:
-		DPRINTF("I/O error - waiting a bit for TT cleanup\n");
+		DPRINTF("error=%s - waiting a bit for TT cleanup\n",
+		    usbd_errstr(err));
 		usb_pause_mtx(mtx, hz / 16);
 		break;
 	}
@@ -1008,7 +1009,7 @@ usbd_req_get_desc(struct usb_device *udev,
 		USETW(req.wLength, min_len);
 
 		err = usbd_do_request_flags(udev, mtx, &req,
-		    desc, 0, NULL, 500 /* ms */);
+		    desc, 0, NULL, 1000 /* ms */);
 
 		if (err != 0 && err != USB_ERR_TIMEOUT &&
 		    min_len != max_len) {
@@ -1019,7 +1020,7 @@ usbd_req_get_desc(struct usb_device *udev,
 			USETW(req.wLength, max_len);
 
 			err = usbd_do_request_flags(udev, mtx, &req,
-			    desc, USB_SHORT_XFER_OK, NULL, 500 /* ms */);
+			    desc, USB_SHORT_XFER_OK, NULL, 1000 /* ms */);
 
 			if (err == 0) {
 				/* verify length */


More information about the svn-src-all mailing list