mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
FROMGIT: 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>
Bug: 285037166
(cherry picked from commit 18af4b5c97 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I59ca78320bb2705c8aed8a9823de5a955ff97b0c
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
This commit is contained in:
@@ -436,8 +436,8 @@ static 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);
|
||||
|
||||
Reference in New Issue
Block a user