Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Pull across fix from HEAD



details:   https://anonhg.NetBSD.org/src/rev/4f21c27d9a62
branches:  nick-nhusb
changeset: 804518:4f21c27d9a62
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Feb 06 07:53:11 2016 +0000

description:
Pull across fix from HEAD

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 cfef69c5d1b5 -r 4f21c27d9a62 sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Thu Jan 28 13:01:30 2016 +0000
+++ b/sys/dev/usb/uhub.c        Sat Feb 06 07:53:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.126.2.21 2016/01/28 13:01:30 skrll Exp $    */
+/*     $NetBSD: uhub.c,v 1.126.2.22 2016/02/06 07:53:11 skrll Exp $    */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 /*     $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
 
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.126.2.21 2016/01/28 13:01:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.126.2.22 2016/02/06 07:53:11 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -668,6 +668,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->up_status);
                if (err) {
@@ -675,6 +676,7 @@
                            "err %d", device_unit(sc->sc_dev), port, err, 0);
                        continue;
                }
+#endif
                status = UGETW(up->up_status.wPortStatus);
                change = UGETW(up->up_status.wPortChange);
                DPRINTF("hub %d port %d after reset: s/c=%x/%x",



Home | Main Index | Thread Index | Old Index