Correct use of USB 3.0 POWER bit in the port status register,
hence it was overlapping the USB 3.0 root HUB's speed bits. Reported by: Kohji Okuno MFC after: 1 week
This commit is contained in:
parent
675e68d8b5
commit
7961ab20e2
@ -3194,8 +3194,13 @@ xhci_roothub_exec(struct usb_device *udev,
|
||||
i |= UPS_OVERCURRENT_INDICATOR;
|
||||
if (v & XHCI_PS_PR)
|
||||
i |= UPS_RESET;
|
||||
if (v & XHCI_PS_PP)
|
||||
i |= UPS_PORT_POWER_SS;
|
||||
if (v & XHCI_PS_PP) {
|
||||
/*
|
||||
* The USB 3.0 RH is using the
|
||||
* USB 2.0's power bit
|
||||
*/
|
||||
i |= UPS_PORT_POWER;
|
||||
}
|
||||
USETW(sc->sc_hub_desc.ps.wPortStatus, i);
|
||||
|
||||
i = 0;
|
||||
|
@ -327,6 +327,7 @@ uhub_reattach_port(struct uhub_softc *sc, uint8_t portno)
|
||||
enum usb_dev_speed speed;
|
||||
enum usb_hc_mode mode;
|
||||
usb_error_t err;
|
||||
uint16_t power_mask;
|
||||
uint8_t timeout;
|
||||
|
||||
DPRINTF("reattaching port %d\n", portno);
|
||||
@ -373,20 +374,22 @@ repeat:
|
||||
case USB_SPEED_HIGH:
|
||||
case USB_SPEED_FULL:
|
||||
case USB_SPEED_LOW:
|
||||
if (!(sc->sc_st.port_status & UPS_PORT_POWER)) {
|
||||
DPRINTF("WARNING: strange, connected port %d "
|
||||
"has no power\n", portno);
|
||||
}
|
||||
power_mask = UPS_PORT_POWER;
|
||||
break;
|
||||
case USB_SPEED_SUPER:
|
||||
if (!(sc->sc_st.port_status & UPS_PORT_POWER_SS)) {
|
||||
DPRINTF("WARNING: strange, connected port %d "
|
||||
"has no power\n", portno);
|
||||
}
|
||||
if (udev->parent_hub == NULL)
|
||||
power_mask = UPS_PORT_POWER;
|
||||
else
|
||||
power_mask = UPS_PORT_POWER_SS;
|
||||
break;
|
||||
default:
|
||||
power_mask = 0;
|
||||
break;
|
||||
}
|
||||
if (!(sc->sc_st.port_status & power_mask)) {
|
||||
DPRINTF("WARNING: strange, connected port %d "
|
||||
"has no power\n", portno);
|
||||
}
|
||||
|
||||
/* check if the device is in Host Mode */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user