diff options
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index ad89a6d4111b..da9158f171cb 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -112,7 +112,7 @@ static int xhci_create_usb3_bos_desc(struct xhci_hcd *xhci, char *buf, | |||
112 | 112 | ||
113 | /* If PSI table exists, add the custom speed attributes from it */ | 113 | /* If PSI table exists, add the custom speed attributes from it */ |
114 | if (usb3_1 && xhci->usb3_rhub.psi_count) { | 114 | if (usb3_1 && xhci->usb3_rhub.psi_count) { |
115 | u32 ssp_cap_base, bm_attrib, psi; | 115 | u32 ssp_cap_base, bm_attrib, psi, psi_mant, psi_exp; |
116 | int offset; | 116 | int offset; |
117 | 117 | ||
118 | ssp_cap_base = USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE; | 118 | ssp_cap_base = USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE; |
@@ -139,6 +139,15 @@ static int xhci_create_usb3_bos_desc(struct xhci_hcd *xhci, char *buf, | |||
139 | for (i = 0; i < xhci->usb3_rhub.psi_count; i++) { | 139 | for (i = 0; i < xhci->usb3_rhub.psi_count; i++) { |
140 | psi = xhci->usb3_rhub.psi[i]; | 140 | psi = xhci->usb3_rhub.psi[i]; |
141 | psi &= ~USB_SSP_SUBLINK_SPEED_RSVD; | 141 | psi &= ~USB_SSP_SUBLINK_SPEED_RSVD; |
142 | psi_exp = XHCI_EXT_PORT_PSIE(psi); | ||
143 | psi_mant = XHCI_EXT_PORT_PSIM(psi); | ||
144 | |||
145 | /* Shift to Gbps and set SSP Link BIT(14) if 10Gpbs */ | ||
146 | for (; psi_exp < 3; psi_exp++) | ||
147 | psi_mant /= 1000; | ||
148 | if (psi_mant >= 10) | ||
149 | psi |= BIT(14); | ||
150 | |||
142 | if ((psi & PLT_MASK) == PLT_SYM) { | 151 | if ((psi & PLT_MASK) == PLT_SYM) { |
143 | /* Symmetric, create SSA RX and TX from one PSI entry */ | 152 | /* Symmetric, create SSA RX and TX from one PSI entry */ |
144 | put_unaligned_le32(psi, &buf[offset]); | 153 | put_unaligned_le32(psi, &buf[offset]); |
@@ -1506,9 +1515,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd) | |||
1506 | t2 |= PORT_WKOC_E | PORT_WKCONN_E; | 1515 | t2 |= PORT_WKOC_E | PORT_WKCONN_E; |
1507 | t2 &= ~PORT_WKDISC_E; | 1516 | t2 &= ~PORT_WKDISC_E; |
1508 | } | 1517 | } |
1509 | if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && | ||
1510 | (hcd->speed < HCD_USB3)) | ||
1511 | t2 &= ~PORT_WAKE_BITS; | ||
1512 | } else | 1518 | } else |
1513 | t2 &= ~PORT_WAKE_BITS; | 1519 | t2 &= ~PORT_WAKE_BITS; |
1514 | 1520 | ||