Module Name:    src
Committed By:   skrll
Date:           Fri Feb  5 15:41:49 UTC 2016

Modified Files:
        src/sys/dev/usb: uhub.c

Log Message:
Use the port status straight after the reset and not after the

        usbd_clear_port_feature(dev, port, UHF_C_PORT_RESET)

The Gadget USB HUB in the IBM x3250 sborrill sent me returns the wrong
status and this would appear to leave the attached cdce(4) in the default
state.  The next device probed fails as a result.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/usb/uhub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.129 src/sys/dev/usb/uhub.c:1.130
--- src/sys/dev/usb/uhub.c:1.129	Sat Mar 28 07:58:00 2015
+++ src/sys/dev/usb/uhub.c	Fri Feb  5 15:41:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.129 2015/03/28 07:58:00 skrll Exp $	*/
+/*	$NetBSD: uhub.c,v 1.130 2016/02/05 15:41:49 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.129 2015/03/28 07:58:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.130 2016/02/05 15:41:49 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -560,6 +560,7 @@ uhub_explore(usbd_device_handle dev)
 			    "port %d reset failed\n", port);
 			continue;
 		}
+#if 0
 		/* Get port status again, it might have changed during reset */
 		err = usbd_get_port_status(dev, port, &up->status);
 		if (err) {
@@ -567,6 +568,7 @@ uhub_explore(usbd_device_handle dev)
 			    "err %d", device_unit(sc->sc_dev), port, err, 0);
 			continue;
 		}
+#endif
 		status = UGETW(up->status.wPortStatus);
 		change = UGETW(up->status.wPortChange);
 		if (!(status & UPS_CURRENT_CONNECT_STATUS)) {

Reply via email to