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

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

 



Yoma, can you apply this patch and see if it helps your issue?

Thanks,
Sarah Sharp

On Wed, Jan 22, 2014 at 03:38:51PM -0800, Sarah Sharp wrote:
> 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
> 
> --
> 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
>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