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

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

 



On 06.06.2017 13:13, Jiahau Chang wrote:
v4: Remove the patch code in case USB_PORT_FEAT_REMOTE_WAKE_MASK

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 |  2 ++
  drivers/usb/host/xhci-pci.c | 13 +++++++++++++
  drivers/usb/host/xhci.h     |  2 ++
  3 files changed, 17 insertions(+)

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 0dde49c..8994676 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1461,6 +1461,8 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
  				t2 |= PORT_WKOC_E | PORT_WKCONN_E;
  				t2 &= ~PORT_WKDISC_E;
  			}
+			if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && (hcd->speed < HCD_USB3))
+				t2 &= ~PORT_WAKE_BITS;

This will disable connect/disconnect/overcurrent wake for all usb2 ports on AMD Promontory host.
I don't think that is what you want.

Is there a way for the driver to see which ports are disabled in bios?
If yes, then it would be better to just disable wake for those ports

-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