aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/xhci-hub.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 83fc636fa254..93f3fdf0ff0a 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -461,8 +461,15 @@ void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array,
461 } 461 }
462} 462}
463 463
464/* Updates Link Status for USB 2.1 port */
465static void xhci_hub_report_usb2_link_state(u32 *status, u32 status_reg)
466{
467 if ((status_reg & PORT_PLS_MASK) == XDEV_U2)
468 *status |= USB_PORT_STAT_L1;
469}
470
464/* Updates Link Status for super Speed port */ 471/* Updates Link Status for super Speed port */
465static void xhci_hub_report_link_state(u32 *status, u32 status_reg) 472static void xhci_hub_report_usb3_link_state(u32 *status, u32 status_reg)
466{ 473{
467 u32 pls = status_reg & PORT_PLS_MASK; 474 u32 pls = status_reg & PORT_PLS_MASK;
468 475
@@ -631,14 +638,16 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
631 else 638 else
632 status |= USB_PORT_STAT_POWER; 639 status |= USB_PORT_STAT_POWER;
633 } 640 }
634 /* Update Port Link State for super speed ports*/ 641 /* Update Port Link State */
635 if (hcd->speed == HCD_USB3) { 642 if (hcd->speed == HCD_USB3) {
636 xhci_hub_report_link_state(&status, raw_port_status); 643 xhci_hub_report_usb3_link_state(&status, raw_port_status);
637 /* 644 /*
638 * Verify if all USB3 Ports Have entered U0 already. 645 * Verify if all USB3 Ports Have entered U0 already.
639 * Delete Compliance Mode Timer if so. 646 * Delete Compliance Mode Timer if so.
640 */ 647 */
641 xhci_del_comp_mod_timer(xhci, raw_port_status, wIndex); 648 xhci_del_comp_mod_timer(xhci, raw_port_status, wIndex);
649 } else {
650 xhci_hub_report_usb2_link_state(&status, raw_port_status);
642 } 651 }
643 if (bus_state->port_c_suspend & (1 << wIndex)) 652 if (bus_state->port_c_suspend & (1 << wIndex))
644 status |= 1 << USB_PORT_FEAT_C_SUSPEND; 653 status |= 1 << USB_PORT_FEAT_C_SUSPEND;