Skip to content

Commit 18af4b5

Browse files
wcheng-enggregkh
authored andcommitted
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>
1 parent fb2ce17 commit 18af4b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/host/xhci-plat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ void xhci_plat_remove(struct platform_device *dev)
398398
struct clk *reg_clk = xhci->reg_clk;
399399
struct usb_hcd *shared_hcd = xhci->shared_hcd;
400400

401-
pm_runtime_get_sync(&dev->dev);
402401
xhci->xhc_state |= XHCI_STATE_REMOVING;
402+
pm_runtime_get_sync(&dev->dev);
403403

404404
if (shared_hcd) {
405405
usb_remove_hcd(shared_hcd);

0 commit comments

Comments
 (0)