summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorWesley Cheng <quic_wcheng@quicinc.com>2023-05-31 15:27:19 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-23 09:55:09 +0200
commit18af4b5c97915a6daef9de28a30ae1d3786bc2ac (patch)
tree509bf73a501b69d412811a762754e8616ae764f9 /drivers/usb
parentfb2ce17874cf3c3c183e5fd75144ffbe2313bf31 (diff)
downloadlinux-stable-18af4b5c97915a6daef9de28a30ae1d3786bc2ac.tar.gz
linux-stable-18af4b5c97915a6daef9de28a30ae1d3786bc2ac.tar.bz2
linux-stable-18af4b5c97915a6daef9de28a30ae1d3786bc2ac.zip
usb: host: xhci-plat: Set XHCI_STATE_REMOVING before resuming XHCI HC
There are situations during the xhci_resume() sequence, which allows for re-initializing of the XHCI HC. However, in case the HCD is being removed, these operations may not be needed. Set the removal state before issuing the runtime PM get on the XHCI device, so that the XHCI resume routine will know when to bypass the re-init logic. Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> Message-ID: <20230531222719.14143-3-quic_wcheng@quicinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-plat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 1d902d1513bc..b26ea7cb4357 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -398,8 +398,8 @@ void xhci_plat_remove(struct platform_device *dev)
struct clk *reg_clk = xhci->reg_clk;
struct usb_hcd *shared_hcd = xhci->shared_hcd;
- pm_runtime_get_sync(&dev->dev);
xhci->xhc_state |= XHCI_STATE_REMOVING;
+ pm_runtime_get_sync(&dev->dev);
if (shared_hcd) {
usb_remove_hcd(shared_hcd);