Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev/usb Pull up following revision(s) (requested by s...



details:   https://anonhg.NetBSD.org/src/rev/1940d80e1ab2
branches:  netbsd-7
changeset: 798225:1940d80e1ab2
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Aug 11 15:36:45 2014 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #3):
        sys/dev/usb/xhci.c: revision 1.24
PR/49091: xhci: wrong wMaxPacketSize value
While this is correct according to the specification only fixed sizes
are allowed, i.e. 512 for SS, etc. Maybe these should be used?

diffstat:

 sys/dev/usb/xhci.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r fc2a89a413c0 -r 1940d80e1ab2 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Mon Aug 11 09:21:47 2014 +0000
+++ b/sys/dev/usb/xhci.c        Mon Aug 11 15:36:45 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.23 2014/08/05 10:33:46 skrll Exp $  */
+/*     $NetBSD: xhci.c,v 1.23.2.1 2014/08/11 15:36:45 martin Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.23 2014/08/05 10:33:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.23.2.1 2014/08/11 15:36:45 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1524,10 +1524,17 @@
                err = usbd_get_initial_ddesc(dev, dd);
                if (err)
                        return err;
-               USETW(dev->def_ep_desc.wMaxPacketSize, dd->bMaxPacketSize);
+               /* 4.8.2.1 */
+               if (speed == USB_SPEED_SUPER)
+                       USETW(dev->def_ep_desc.wMaxPacketSize,
+                           (1 << dd->bMaxPacketSize));
+               else
+                       USETW(dev->def_ep_desc.wMaxPacketSize,
+                           dd->bMaxPacketSize);
                device_printf(sc->sc_dev, "%s bMaxPacketSize %u\n", __func__,
                    dd->bMaxPacketSize);
-               xhci_update_ep0_mps(sc, xs, dd->bMaxPacketSize);
+               xhci_update_ep0_mps(sc, xs,
+                   UGETW(dev->def_ep_desc.wMaxPacketSize));
                err = usbd_reload_device_desc(dev);
                if (err)
                        return err;



Home | Main Index | Thread Index | Old Index