[Bug 218987] USB devices are not detected after Save/Restore error on Intel xHC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=218987

Mathias Nyman (mathias.nyman@xxxxxxxxxxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mathias.nyman@linux.intel.c
                   |                            |om

--- Comment #3 from Mathias Nyman (mathias.nyman@xxxxxxxxxxxxxxx) ---
Thanks for debugging this.

Issue 1, reason for SRE is unknown to me as well.
Issue 2 is probably due to PORTSC not immediately showing connected devices
after host is restarted. This is especially true for USB3 devices where device
only shows up in PORTSC after successful link training.   

A similar issue was solved in:
commit 33e321586e37 ("xhci: Add grace period after xHC start to prevent
premature runtime suspend")

In your SRE case we never event start polling the roothub.

How about a solution that is similar to your patch but doesn't touch
pending_portevent. Instead we always resume roothubs in case xHC was reset
during resume.

Does the oneliner below work for you?

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 37eb37b0affa..12b9c2c7f39f 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1172,7 +1172,7 @@ int xhci_resume(struct xhci_hcd *xhci, pm_message_t msg)
                        pending_portevent = xhci_pending_portevent(xhci);
                }

-               if (pending_portevent) {
+               if (pending_portevent || reinit_xhc) {
                        if (xhci->shared_hcd)
                                usb_hcd_resume_root_hub(xhci->shared_hcd);
                        usb_hcd_resume_root_hub(hcd);

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux