Module Name:    src
Committed By:   skrll
Date:           Sun Apr 10 15:51:32 UTC 2016

Modified Files:
        src/sys/dev/usb [nick-nhusb]: xhci.c

Log Message:
Fix set_port_feature U[12]_TIMEOUT to work when speed > 4.

>From Takahiro HAYASHI


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.61 -r1.28.2.62 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.61 src/sys/dev/usb/xhci.c:1.28.2.62
--- src/sys/dev/usb/xhci.c:1.28.2.61	Sun Apr 10 15:50:24 2016
+++ src/sys/dev/usb/xhci.c	Sun Apr 10 15:51:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.28.2.61 2016/04/10 15:50:24 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.28.2.62 2016/04/10 15:51:32 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.61 2016/04/10 15:50:24 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.62 2016/04/10 15:51:32 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -3016,7 +3016,7 @@ xhci_roothub_ctrl(struct usbd_bus *bus, 
 			xhci_op_write_4(sc, port, v | XHCI_PS_PRC);
 			break;
 		case UHF_PORT_U1_TIMEOUT:
-			if (XHCI_PS_SPEED_GET(v) != XHCI_PS_SPEED_SS) {
+			if (XHCI_PS_SPEED_GET(v) < XHCI_PS_SPEED_SS) {
 				return -1;
 			}
 			port = XHCI_PORTPMSC(index);
@@ -3026,7 +3026,7 @@ xhci_roothub_ctrl(struct usbd_bus *bus, 
 			xhci_op_write_4(sc, port, v);
 			break;
 		case UHF_PORT_U2_TIMEOUT:
-			if (XHCI_PS_SPEED_GET(v) != XHCI_PS_SPEED_SS) {
+			if (XHCI_PS_SPEED_GET(v) < XHCI_PS_SPEED_SS) {
 				return -1;
 			}
 			port = XHCI_PORTPMSC(index);

Reply via email to