Re: [RFT] usb: Disable Link PM if setting device-initiated timeout fails.

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

 



On Fri, Jan 31, 2014 at 04:56:36PM +0000, David Laight wrote:
> From: Sarah Sharp
> > Yoma, can you apply this patch and see if it helps your issue?
> 
> Helped a lot on my amd system with the ASMedia controller.

Your ASMedia host controller should not even have USB 3.0 link PM
enabled, see this patch that I'm sending out shortly:

https://git.kernel.org/cgit/linux/kernel/git/sarah/xhci.git/commit/?h=for-usb-linus-3.14&id=140e3026a57ab7d830dab2f2c57796c222db0ea9

I really need Yoma to test this patch, since their xHCI host controller
should have USB 3.0 Link PM enabled.

Yoma, if you need instructions on how to apply the attached patch,
please see this page:

http://kernelnewbies.org/KernelBuild

Sarah Sharp
>From d14b38edc3494c6299695624b4847445ebabe645 Mon Sep 17 00:00:00 2001
From: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
Date: Wed, 22 Jan 2014 15:24:53 -0800
Subject: [PATCH] usb: Disable Link PM if setting device-initiated timeout
 fails.

If the control transfer to set the device-initiated timeout fails for a
particular link state (U1 or U2), disable that state.  This may solve
issues with a Seagate drive connected to an Intel Panther Point host
controller:

[  432.191560] usb 4-1: Set SEL for device-initiated U2 failed.
[  432.191664] usb 4-1: USB disconnect, device number 12
[  469.061694] xhci_hcd 0000:00:14.0: Timeout while waiting for
address device command
[  474.271626] xhci_hcd 0000:00:14.0: Timeout while waiting for
address device command
[  474.475859] usb 4-1: device not accepting address 13, error -62
[  474.592197] usb 4-1: new SuperSpeed USB device number 14 using xhci_hcd
[  474.609564] usb 4-1: New USB device found, idVendor=0bc2, idProduct=a0a5
[  474.609569] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  474.609572] usb 4-1: Product: Backup+ Desk
[  474.609574] usb 4-1: Manufacturer: Seagate
[  474.609576] usb 4-1: SerialNumber: NA5J3BMX
[  474.613800] usb 4-1: Enable of device-initiated U2 failed.
[  474.617303] usb 4-1: Disable of device-initiated U1 failed.
[  474.620807] usb 4-1: Disable of device-initiated U2 failed.
[  474.620840] usb-storage 4-1:1.0: USB Mass Storage device detected
[  474.620928] scsi17 : usb-storage 4-1:1.0
[  474.624340] usb 4-1: Set SEL for device-initiated U1 failed.
[  479.629776] usb 4-1: Set SEL for device-initiated U2 failed.
[  479.798030] usb 4-1: USB disconnect, device number 14

00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host
Controller (rev 04) (prog-if 30 [XHCI])
Subsystem: Lenovo Device 21f7
Flags: bus master, medium devsel, latency 0, IRQ 40
Memory at f2600000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Kernel driver in use: xhci_hcd

Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
Reported-by: Yoma Sophian <sophian.yoma@xxxxxxxxx>
---
 drivers/usb/core/hub.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 64ea21971be2..74a69b887346 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3651,7 +3651,8 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev,
 
 	/* Only a configured device will accept the Set Feature U1/U2_ENABLE */
 	else if (udev->actconfig)
-		usb_set_device_initiated_lpm(udev, state, true);
+		if (usb_set_device_initiated_lpm(udev, state, true))
+			hcd->driver->disable_usb3_lpm_timeout(hcd, udev, state);
 
 }
 
-- 
1.8.5.2


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

  Powered by Linux