These bits will be set after we do a HC Reset and need to be cleared. (XHCI 14.19.1.2.3). Signed-off-by: John Youn <johnyoun@xxxxxxxxxxxx> --- drivers/usb/host/xhci-hub.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index eac5b53..c75065d 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -272,6 +272,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) { unsigned long flags; u32 temp, status; + u32 clear; int i, retval; struct xhci_hcd *xhci = hcd_to_xhci(hcd); int ports; @@ -302,6 +303,22 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) buf[1] |= 1 << (i - 7); status = 1; } + /* FIXME: These are not supported yet in usbcore + * however they need to be cleared somewhere because + * they will be set when we do a HC Reset + * (XHCI 14.19.1.2.3). */ + if (temp & (PORT_WRC | PORT_RC)) { + clear = xhci_port_state_to_neutral(temp); + if (temp & PORT_WRC) { + clear |= PORT_WRC; + xhci_dbg(xhci, "Clearing PORT_WRC\n"); + } + if (temp & PORT_RC) { + clear |= PORT_RC; + xhci_dbg(xhci, "Clearing PORT_RC\n"); + } + xhci_writel(xhci, clear, addr); + } } spin_unlock_irqrestore(&xhci->lock, flags); return status ? retval : 0; -- 1.6.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html