linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1 1/1] usb/host: Let usb phy shutdown later
@ 2022-04-12 12:25 Surong Pang
  2022-04-19 14:45 ` Mathias Nyman
  0 siblings, 1 reply; 10+ messages in thread
From: Surong Pang @ 2022-04-12 12:25 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

From: Surong Pang <surong.pang@unisoc.com>

Let usb phy shutdown later in xhci_plat_remove function.
Some phy driver doesn't divide 3.0/2.0 very clear.
If calls usb_phy_shutdown earlier than usb_remove_hcd(hcd),
It will case 10s cmd timeout issue.

Call usb phy shutdown later has better compatibility.

Signed-off-by: Surong Pang <surong.pang@unisoc.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 649ffd861b44..dc73a81cbe9b 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -390,7 +390,6 @@ static int xhci_plat_remove(struct platform_device *dev)
 
 	usb_remove_hcd(shared_hcd);
 	xhci->shared_hcd = NULL;
-	usb_phy_shutdown(hcd->usb_phy);
 
 	usb_remove_hcd(hcd);
 	usb_put_hcd(shared_hcd);
@@ -398,6 +397,7 @@ static int xhci_plat_remove(struct platform_device *dev)
 	clk_disable_unprepare(clk);
 	clk_disable_unprepare(reg_clk);
 	usb_put_hcd(hcd);
+	usb_phy_shutdown(hcd->usb_phy);
 
 	pm_runtime_disable(&dev->dev);
 	pm_runtime_put_noidle(&dev->dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-29  1:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12 12:25 [PATCH V1 1/1] usb/host: Let usb phy shutdown later Surong Pang
2022-04-19 14:45 ` Mathias Nyman
2022-04-22  2:10   ` surong pang
2022-04-22  7:53     ` Mathias Nyman
2022-04-22 10:43       ` surong pang
2022-04-22 11:59         ` Mathias Nyman
2022-04-24  1:57           ` [PATCH V2] " Surong Pang
2022-04-26 11:53             ` Greg KH
     [not found]               ` <CAEDbmAQmYQdMNY8sANnSuauBcsemrV1MFR3bB83JJ7cHNdWGmA@mail.gmail.com>
2022-04-28  6:31                 ` Greg KH
2022-04-29  1:54                 ` [PATCH V2] xhci-plat: " surong pang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).