aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2020-03-11 08:21:48 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2020-03-11 08:21:48 +0000
commitfcb6db628b3e6b452f6723586a0779220d3b4e33 (patch)
tree9510b7dc36c9fe4efa70de71e1ed66b3574e0ff5 /sys
parent6ad24bd73007c5a6de813717d8ff4b467647d789 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/controller/xhci.c11
-rw-r--r--sys/dev/usb/usb_hub.c4
2 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 519090d55e22..b80d5d599bfe 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -3591,13 +3591,10 @@ xhci_roothub_exec(struct usb_device *udev,
i |= UPS_OVERCURRENT_INDICATOR;
if (v & XHCI_PS_PR)
i |= UPS_RESET;
- if (v & XHCI_PS_PP) {
- /*
- * The USB 3.0 RH is using the
- * USB 2.0's power bit
- */
- i |= UPS_PORT_POWER;
- }
+#if 0
+ if (v & XHCI_PS_PP)
+ /* XXX undefined */
+#endif
USETW(sc->sc_hub_desc.ps.wPortStatus, i);
i = 0;
diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c
index c8d87ac77b41..411460ce73ed 100644
--- a/sys/dev/usb/usb_hub.c
+++ b/sys/dev/usb/usb_hub.c
@@ -692,7 +692,7 @@ repeat:
break;
case USB_SPEED_SUPER:
if (udev->parent_hub == NULL)
- power_mask = UPS_PORT_POWER;
+ power_mask = 0; /* XXX undefined */
else
power_mask = UPS_PORT_POWER_SS;
break;
@@ -700,7 +700,7 @@ repeat:
power_mask = 0;
break;
}
- if (!(sc->sc_st.port_status & power_mask)) {
+ if ((sc->sc_st.port_status & power_mask) != power_mask) {
DPRINTF("WARNING: strange, connected port %d "
"has no power\n", portno);
}