mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: xhci: skip re-check pending port event if hibernated
@ 2021-12-09  7:22 Chunfeng Yun
  2021-12-10 13:33 ` Mathias Nyman
  0 siblings, 1 reply; 6+ messages in thread
From: Chunfeng Yun @ 2021-12-09  7:22 UTC (permalink / raw)
  To: Mathias Nyman
  Cc: Chunfeng Yun, Greg Kroah-Hartman, Matthias Brugger, linux-usb,
	linux-arm-kernel, linux-mediatek, linux-kernel, Eddie Hung,
	Yun-Chien Yu

When xHCI controller hibernated, the root hub lost power, if controller
support Port Power Control (PPC), PP is not set at xhci_resume() and
set by hub_reset_resume() later, so no need check pending port event.
If PPC is not supported, device is disconneced, seems do not send out
U3 LFPS wake signal, no need re-check again and drop 120ms delay to
save resume time.

Reported-by: Yun-Chien Yu <yun-chien.yu@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 902f410874e8..686d8e6f03f6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1235,7 +1235,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 		 * the first wake signalling failed, give it that chance.
 		 */
 		pending_portevent = xhci_pending_portevent(xhci);
-		if (!pending_portevent) {
+		if (!pending_portevent && !hibernated) {
 			msleep(120);
 			pending_portevent = xhci_pending_portevent(xhci);
 		}
-- 
2.18.0


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

end of thread, other threads:[~2021-12-17  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09  7:22 [PATCH] usb: xhci: skip re-check pending port event if hibernated Chunfeng Yun
2021-12-10 13:33 ` Mathias Nyman
2021-12-14  8:00   ` Jun Li
2021-12-14 10:05     ` Mathias Nyman
2021-12-15  2:09       ` Jun Li
2021-12-17  9:40       ` Chunfeng Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®