[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230531222719.14143-3-quic_wcheng@quicinc.com>
Date: Wed, 31 May 2023 15:27:19 -0700
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: <mathias.nyman@...el.com>, <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
Wesley Cheng <quic_wcheng@...cinc.com>
Subject: [PATCH v3 2/2] 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@...cinc.com>
---
drivers/usb/host/xhci-plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index a666b21c21bb..a1e552d9da09 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -403,8 +403,8 @@ int 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);
Powered by blists - more mailing lists