Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: host: xhci-mtk: avoid runtime suspend when removing hcd

When runtime suspend was enabled, runtime suspend might happen
when xhci is removing hcd. This might cause kernel panic when hcd
has been freed but runtime pm suspend related handle need to
reference it.

Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200624135949.22611-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Macpaul Lin and committed by
Greg Kroah-Hartman
a24d5072 a73d9d9c

+3 -2
+3 -2
drivers/usb/host/xhci-mtk.c
··· 587 587 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 588 588 struct usb_hcd *shared_hcd = xhci->shared_hcd; 589 589 590 + pm_runtime_put_noidle(&dev->dev); 591 + pm_runtime_disable(&dev->dev); 592 + 590 593 usb_remove_hcd(shared_hcd); 591 594 xhci->shared_hcd = NULL; 592 595 device_init_wakeup(&dev->dev, false); ··· 600 597 xhci_mtk_sch_exit(mtk); 601 598 xhci_mtk_clks_disable(mtk); 602 599 xhci_mtk_ldos_disable(mtk); 603 - pm_runtime_put_sync(&dev->dev); 604 - pm_runtime_disable(&dev->dev); 605 600 606 601 return 0; 607 602 }