Re: USB timeout during S3 suspend w/ NEC Corporation uPD720200

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

 



On 03/07/2012 06:42 AM, Thilo-Alexander Ginkel wrote:
> On Fri, Mar 2, 2012 at 21:20, Thilo-Alexander Ginkel <thilo@xxxxxxxxxx> wrote:
>> from time to time my laptop (a Lenovo ThinkPad T420s) freezes while
>> attempting to enter S3. From the dmesg output it seems that it is
>> encountering a timeout while attempting to suspend the NEC Corporation
>> uPD720200 USB 3.0 controller:
>>
>> xhci_hcd 0000:0d:00.0: WARN: xHC CMD_RUN timeout
>> suspend_common(): xhci_pci_suspend+0x0/0x40 [xhci_hcd] returns -110
>> sdhci-pci 0000:05:00.0: PCI INT A disabled
>> pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -110
> 

Please check if the patch attached helps.
If not, modify XHCI_MAX_HALT_USEC to some bigger number, for example, 50000.

Thanks,
Andiry


> In the meantime I have been able to capture more verbose debug traces
> (with CONFIG_USB_DEBUG=y on Kernel 3.2.9 x86_64). The photograph I am
> copying this from is a little blurry (I had to hurry exiting a train),
> so some numbers may be wrong...
> 
> usb 2-1.4: unlink qh16-0001/ffff????? start 3 [2/0 us]
> ...
> usb usb1: usb auto-resume
> usb usb4: usb auto-resume
> usb usb3: usb auto-resume
> hub 4-0:1.0: hub_resume
> xhci_hcd 0000:0d:00.0: CTRL: TypeReq=0xa(?)300 val=0x0 idx=0x01 len=4 ==> -19
> hub 4-0:1.0: hub_port_status failed (err = -19)
> xhci_hcd 0000:0d:00.0: CTRL: TypeReq=0xa300 val=0x0 idx=0x02 len=4 ==> -19
> hub 4-0:1.0: hub_port_status failed (err = -19)
> hub 4-0:1.0: hub_suspend
> usb usb4: bus suspend, wakeup 0
> ehci_hcd 0000:00:1a.0: resume root hub
> usb 2-1.4: unlink qh16-0001/ffff????? start 2 [2/0 us]
> usb 2-1.4: usb suspend, wakeup 0
> hub 3-0:1.0: hub_resume
> xhci_hcd 0000:0d:00.0: CTRL: TypeReq=0xa300 val=0x0 idx=0x01 len=4 ==> -19
> hub 3-0:1.0: hub_port_status failed (err = -19)
> xhci_hcd 0000:0d:00.0: CTRL: TypeReq=0xa300 val=0x0 idx=0x02 len=4 ==> -19
> hub 3-0:1.0: hub_port_status failed (err = -19)
> hub 3-0:1.0: hub_suspend
> sdhci-pci 0000:05:00.0: PCI INT A disabled
> usb usb3: bus suspend, wakeup 0
> xhci_hcd 0000:0d:00.0: WARN: xHC CMD_RUN timeout
> 
> I hope this makes more sense... The original photograph is available
> at: http://ubuntuone.com/3tQuSs9gVtcSts6XqvUeDg
> 
>> lsusb -v: https://secure.tgbyte.de/dropbox/Aiwir1oo-lsusb-v.txt
>>
>> lspci -v: https://secure.tgbyte.de/dropbox/Aiwir1oo-lspci-v.txt
> 
> Please let me know if you prefer a Bugzilla report instead of this mail.
> 
> Thanks,
> Thilo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 4a0d922..a0fcf29 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -769,7 +769,7 @@ int xhci_suspend(struct xhci_hcd *xhci)
 	command &= ~CMD_RUN;
 	xhci_writel(xhci, command, &xhci->op_regs->command);
 	if (handshake(xhci, &xhci->op_regs->status,
-		      STS_HALT, STS_HALT, 100*100)) {
+			STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC)) {
 		xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n");
 		spin_unlock_irq(&xhci->lock);
 		return -ETIMEDOUT;

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

  Powered by Linux