[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191113014927.11915-1-henryl@nvidia.com>
Date: Wed, 13 Nov 2019 09:49:27 +0800
From: Henry Lin <henryl@...dia.com>
To: unlisted-recipients:; (no To-header on input)
CC: <hch@...radead.org>, Henry Lin <henryl@...dia.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] usb: xhci: only set D3hot for pci device
Xhci driver cannot call pci_set_power_state() on non-pci xhci host
controllers. For example, NVIDIA Tegra XHCI host controller which acts
as platform device with XHCI_SPURIOUS_WAKEUP quirk set in some platform
hits this issue during shutdown.
Signed-off-by: Henry Lin <henryl@...dia.com>
---
drivers/usb/host/xhci.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6c17e3fe181a..61718b126d2b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -791,8 +791,11 @@ static void xhci_shutdown(struct usb_hcd *hcd)
readl(&xhci->op_regs->status));
/* Yet another workaround for spurious wakeups at shutdown with HSW */
- if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
- pci_set_power_state(to_pci_dev(hcd->self.sysdev), PCI_D3hot);
+ if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) {
+ if (dev_is_pci(hcd->self.sysdev))
+ pci_set_power_state(to_pci_dev(hcd->self.sysdev),
+ PCI_D3hot);
+ }
}
#ifdef CONFIG_PM
--
2.17.1
Powered by blists - more mailing lists