Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use the port status straight after the reset and...



details:   https://anonhg.NetBSD.org/src/rev/792336ba381d
branches:  trunk
changeset: 343462:792336ba381d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Feb 05 15:41:49 2016 +0000

description:
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.

diffstat:

 sys/dev/usb/uhub.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 4f8cfb1ad42f -r 792336ba381d sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Fri Feb 05 15:05:29 2016 +0000
+++ b/sys/dev/usb/uhub.c        Fri Feb 05 15:41:49 2016 +0000
@@ -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 @@
                            "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 @@
                            "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)) {



Home | Main Index | Thread Index | Old Index