]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: Don't enable LPM if the exit latency is zero.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 3 Oct 2012 18:18:05 +0000 (11:18 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 8 Oct 2012 18:48:07 +0000 (11:48 -0700)
commitae8963adb4ad8c5f2a89ca1d99fb7bb721e7599f
tree9a689446b605b40fda63b20e2c1164c4102945b5
parentd01f87c0ffa96cb44faa78710711eb6e974b891c
usb: Don't enable LPM if the exit latency is zero.

Some USB 3.0 devices signal that they don't implement Link PM by having
all zeroes in the U1/U2 exit latencies in their SuperSpeed BOS
descriptor.  Don found that a Western Digital device he has experiences
transfer errors when LPM is enabled.  The lsusb shows the U1/U2 exit
latencies are set to zero:

Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           0 micro seconds
    bU2DevExitLat           0 micro seconds

The fix is to not enable LPM for a particular link state if we find its
corresponding exit latency is zero.

This patch should be backported to kernels as old as 3.5, that contain
the commit 1ea7e0e8e3d0f50901d335ea4178ab2aa8c88201 "USB: Add support to
enable/disable USB3 link states."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Don Zickus <dzickus@redhat.com>
Tested-by: Don Zickus <dzickus@redhat.com>
Cc: stable@vger.kernel.org
drivers/usb/core/hub.c