Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Set the correct MPS for LS devices. From Takahi...



details:   https://anonhg.NetBSD.org/src/rev/548155f6481b
branches:  trunk
changeset: 801644:548155f6481b
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Aug 12 13:50:42 2014 +0000

description:
Set the correct MPS for LS devices.  From Takahiro HAYASHI.

diffstat:

 sys/dev/usb/xhci.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 543021d95aa4 -r 548155f6481b sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Tue Aug 12 13:48:29 2014 +0000
+++ b/sys/dev/usb/xhci.c        Tue Aug 12 13:50:42 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $  */
+/*     $NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $  */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1445,7 +1445,10 @@
        dev->def_ep_desc.bEndpointAddress = USB_CONTROL_ENDPOINT;
        dev->def_ep_desc.bmAttributes = UE_CONTROL;
        /* XXX */
-       USETW(dev->def_ep_desc.wMaxPacketSize, 64);
+       if (speed == USB_SPEED_LOW)
+               USETW(dev->def_ep_desc.wMaxPacketSize, USB_MAX_IPACKET);
+       else
+               USETW(dev->def_ep_desc.wMaxPacketSize, 64);
        dev->def_ep_desc.bInterval = 0;
 
        /* doesn't matter, just don't let it uninitialized */



Home | Main Index | Thread Index | Old Index