Re: [PATCH v3] xhci: AMD Promontory USB disable port support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31.05.2017 10:41, Jiahau Chang wrote:
v3: Fix some checkpatch.pl warnings

For AMD Promontory xHCI host, although you can disable USB 2.0 ports in BIOS
settings, those ports will be enabled anyway after you remove a device on
that port and re-plug it in again. It's a known limitation of the chip.
As a workaround we can clear the PORT_WAKE_BITS.

Signed-off-by: Jiahau Chang <Lars_Chang@xxxxxxxxxxxxxx>
---
  drivers/usb/host/xhci-hub.c | 19 ++++++++++++++-----
  drivers/usb/host/xhci-pci.c | 13 +++++++++++++
  drivers/usb/host/xhci.h     |  2 ++
  3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 0dde49c..aad32c6 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1218,12 +1218,19 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
  			xhci_dbg(xhci, "set port reset, actual port %d status  = 0x%x\n", wIndex, temp);
  			break;
  		case USB_PORT_FEAT_REMOTE_WAKE_MASK:
-			xhci_set_remote_wake_mask(xhci, port_array,
+			if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && (hcd->speed < HCD_USB3)) {
+				temp = readl(port_array[wIndex]);
+				xhci_dbg(xhci, "skip set port remote wake mask, "
+						"actual port %d status  = 0x%x\n",
+						wIndex, temp);

Does this work?

If I remember correctly USB_PORT_FEAT_REMOTE_WAKE_MASK is a USB3 only feature.
The (hcd->speed < HCD_USB3) condition should never be true here.

-Mathias

--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux