public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Surong Pang <surong.pang@gmail.com>
To: mathias.nyman@linux.intel.com
Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	surong.pang@gmail.com, Orson.Zhai@unisoc.com,
	yunguo.wu@unisoc.com
Subject: [PATCH V2] usb/host: Let usb phy shutdown later
Date: Sun, 24 Apr 2022 09:57:57 +0800	[thread overview]
Message-ID: <20220424015757.21993-1-surong.pang@gmail.com> (raw)
In-Reply-To: <e05ec742-c3dc-df7c-c5d7-29358d0a7081@linux.intel.com>

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..fe492ed99cb7 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -390,13 +390,13 @@ 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);
 
 	clk_disable_unprepare(clk);
 	clk_disable_unprepare(reg_clk);
+	usb_phy_shutdown(hcd->usb_phy);
 	usb_put_hcd(hcd);
 
 	pm_runtime_disable(&dev->dev);
-- 
2.17.1


  reply	other threads:[~2022-04-24  1:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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           ` Surong Pang [this message]
2022-04-26 11:53             ` [PATCH V2] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220424015757.21993-1-surong.pang@gmail.com \
    --to=surong.pang@gmail.com \
    --cc=Orson.Zhai@unisoc.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=yunguo.wu@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox