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 Don't use USB_IS_SS when there's a switch (...



details:   https://anonhg.NetBSD.org/src/rev/5000fb5a995e
branches:  nick-nhusb
changeset: 334490:5000fb5a995e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Apr 11 06:50:05 2016 +0000

description:
Don't use USB_IS_SS when there's a switch (speed) to use.

diffstat:

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

diffs (33 lines):

diff -r 8ba7da721034 -r 5000fb5a995e sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sun Apr 10 22:16:00 2016 +0000
+++ b/sys/dev/usb/xhci.c        Mon Apr 11 06:50:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.28.2.65 2016/04/10 22:16:00 skrll Exp $     */
+/*     $NetBSD: xhci.c,v 1.28.2.66 2016/04/11 06:50:05 skrll Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.65 2016/04/10 22:16:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.66 2016/04/11 06:50:05 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -2140,10 +2140,11 @@
        dev->ud_ep0desc.bEndpointAddress = USB_CONTROL_ENDPOINT;
        dev->ud_ep0desc.bmAttributes = UE_CONTROL;
        /* 4.3,  4.8.2.1 */
-       if (USB_IS_SS(speed)) {
+       switch (speed) {
+       case USB_SPEED_SUPER:
+       case USB_SPEED_SUPER_PLUS:
                USETW(dev->ud_ep0desc.wMaxPacketSize, USB_3_MAX_CTRL_PACKET);
-       } else
-       switch (speed) {
+               break;
        case USB_SPEED_FULL:
                /* XXX using 64 as initial mps of ep0 in FS */
        case USB_SPEED_HIGH:



Home | Main Index | Thread Index | Old Index