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/4b9eb75cedd3
branches:  trunk
changeset: 331502:4b9eb75cedd3
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 5987a3a6b523 -r 4b9eb75cedd3 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