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 Fix set_port_feature U[12]_TIMEOUT to work ...



details:   https://anonhg.NetBSD.org/src/rev/e0d759aac55d
branches:  nick-nhusb
changeset: 334486:e0d759aac55d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Apr 10 15:51:32 2016 +0000

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

>From Takahiro HAYASHI

diffstat:

 sys/dev/usb/xhci.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 897678a936b6 -r e0d759aac55d sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sun Apr 10 15:50:24 2016 +0000
+++ b/sys/dev/usb/xhci.c        Sun Apr 10 15:51:32 2016 +0000
@@ -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_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_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);



Home | Main Index | Thread Index | Old Index