Module Name:    src
Committed By:   skrll
Date:           Sun Apr 10 15:49:26 UTC 2016

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

Log Message:
Remove variable v0 becasue ~XHCI_PS_CLEAR does not mask speed bits.

>From Takahiro HAYASHI


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.59 -r1.28.2.60 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.59 src/sys/dev/usb/xhci.c:1.28.2.60
--- src/sys/dev/usb/xhci.c:1.28.2.59	Sun Apr 10 15:48:34 2016
+++ src/sys/dev/usb/xhci.c	Sun Apr 10 15:49:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.28.2.59 2016/04/10 15:48:34 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.28.2.60 2016/04/10 15:49:26 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.59 2016/04/10 15:48:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.60 2016/04/10 15:49:26 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -2985,7 +2985,6 @@ xhci_roothub_ctrl(struct usbd_bus *bus, 
 		port = XHCI_PORTSC(index);
 		v = xhci_op_read_4(sc, port);
 		DPRINTFN(4, "portsc=0x%08x", v, 0, 0, 0);
-		uint32_t v0 = v;
 		v &= ~XHCI_PS_CLEAR;
 		switch (value) {
 		case UHF_PORT_ENABLE:
@@ -3017,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(v0) != XHCI_PS_SPEED_SS) {
+			if (XHCI_PS_SPEED_GET(v) != XHCI_PS_SPEED_SS) {
 				return -1;
 			}
 			port = XHCI_PORTPMSC(index);
@@ -3027,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(v0) != XHCI_PS_SPEED_SS) {
+			if (XHCI_PS_SPEED_GET(v) != XHCI_PS_SPEED_SS) {
 				return -1;
 			}
 			port = XHCI_PORTPMSC(index);

Reply via email to