Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb do a port reset between initial device descripto...



details:   https://anonhg.NetBSD.org/src/rev/4460e4ac53fb
branches:  trunk
changeset: 756653:4460e4ac53fb
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Jul 27 16:15:30 2010 +0000

description:
do a port reset between initial device descriptor fetch and
address assignment - not required by the spec but Windows does so,
fixes a problem with a Sun Keyboard reported by Jonathan Perkin,
verified by Jonathan Kollasch

diffstat:

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

diffs (29 lines):

diff -r 63d086ef166b -r 4460e4ac53fb sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Tue Jul 27 15:16:16 2010 +0000
+++ b/sys/dev/usb/usb_subr.c    Tue Jul 27 16:15:30 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.173 2010/07/25 13:19:27 pgoyette Exp $  */
+/*     $NetBSD: usb_subr.c,v 1.174 2010/07/27 16:15:30 drochner Exp $  */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.173 2010/07/25 13:19:27 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.174 2010/07/27 16:15:30 drochner Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_usbverbose.h"
@@ -1159,6 +1159,10 @@
                return (err);
        }
 
+       /* Windows resets the port here, do likewise */
+       if (up->parent)
+               usbd_reset_port(up->parent, port, &ps);
+
        if (speed == USB_SPEED_HIGH) {
                /* Max packet size must be 64 (sec 5.5.3). */
                if (dd->bMaxPacketSize != USB_2_MAX_CTRL_PACKET) {



Home | Main Index | Thread Index | Old Index