]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Set L1 device slot on USB2 LPM enable/disable.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 8 Oct 2013 00:17:20 +0000 (17:17 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 16 Oct 2013 19:24:18 +0000 (12:24 -0700)
commit5a551c6e46736d2eeca3d7ed9743406366c17cd5
tree42868c13baa8afff6172238357bd77c98b4e04e3
parent0f620c644c675a8ff06e4014cec4ae9dc866527e
xhci: Set L1 device slot on USB2 LPM enable/disable.

To enable USB 2.0 Link Power Management (LPM), the xHCI host controller
needs the device slot ID to generate the device address used in L1 entry
tokens.  That information is set in the L1 device slot ID field of the
USB 2.0 LPM registers.

Currently, the L1 device slot ID is overwritten when the xHCI driver
initiates the software test of USB 2.0 Link PM in
xhci_usb2_software_lpm_test.  It is never cleared when USB 2.0 Link PM
is disabled for the device.  That should be harmless, because the
Hardware LPM Enable (HLE) bit is cleared when USB 2.0 Link PM is
disabled, so the host should not pay attention to the slot ID.

This patch should have no effect on host behavior, but since
xhci_usb2_software_lpm_test is going away in an upcoming bug fix patch,
we need to move that code to the function that enables and disables USB
2.0 Link PM.

This patch should be backported to kernels as old as 3.11, that contain
the commit dd85ebfdf90e4831c594fac99d14bb3f03e7c9d7 "usb: xhci: add USB2
Link power management BESL support".  The upcoming bug fix patch is also
marked for that stable kernel.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h