Module Name: src
Committed By: skrll
Date: Mon Apr 11 06:50:05 UTC 2016
Modified Files:
src/sys/dev/usb [nick-nhusb]: xhci.c
Log Message:
Don't use USB_IS_SS when there's a switch (speed) to use.
To generate a diff of this commit:
cvs rdiff -u -r1.28.2.65 -r1.28.2.66 src/sys/dev/usb/xhci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.65 src/sys/dev/usb/xhci.c:1.28.2.66
--- src/sys/dev/usb/xhci.c:1.28.2.65 Sun Apr 10 22:16:00 2016
+++ src/sys/dev/usb/xhci.c Mon Apr 11 06:50:05 2016
@@ -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 @@ xhci_new_device(device_t parent, struct
dev->ud_ep0desc.bEndpointAddress = USB_CONTROL_ENDPOINT;
dev->ud_ep0desc.bmAttributes = UE_CONTROL;
/* 4.3, 4.8.2.1 */
- if (USB_IS_SS(speed)) {
- USETW(dev->ud_ep0desc.wMaxPacketSize, USB_3_MAX_CTRL_PACKET);
- } else
switch (speed) {
+ case USB_SPEED_SUPER:
+ case USB_SPEED_SUPER_PLUS:
+ USETW(dev->ud_ep0desc.wMaxPacketSize, USB_3_MAX_CTRL_PACKET);
+ break;
case USB_SPEED_FULL:
/* XXX using 64 as initial mps of ep0 in FS */
case USB_SPEED_HIGH: