Changes since v1:
* Push all manipulation of udev->usb2_hw_lpm_allowed and
udev->usb2_hw_lpm_enabled into the USB core:
- Move the BESL or internal port check into the USB core. This allows
us to avoid exporting the port connection type function.
- Move the USB 2.0 Link PM disable on device disconnect from
xhci_free_dev into usb_disable_device
* Various bug fixes:
- Make the patch to enable USB 2.0 LPM if the device supports BESL check
the device descriptor for BESL support, rather than checking if the
xHCI port supports BESL. xHCI ports will always have BESL support on
Haswell-ULT; we want to check the device descriptors instead.
- xhci_usb2_software_lpm_test would return immediately after various
checks (device isn't USB 2.0, etc). That function call was deleted
from xhci_update_device, so move those checks into xhci_update_device.
- Similarly, the xhci_usb2_software_lpm_test would set the L1 device
slot, but the function to enable/disable USB 2.0 LPM would not set or
clear the L1 device slot. Setting the L1 device slot is now moved
into xhci_set_usb2_hardware_lpm.
- If userspace has set the sysfs file usb2_hardware_lpm to enabled
(which sets udev->usb2_hw_lpm_allowed), and the USB device is reset,
make sure USB 2.0 LPM gets re-enabled after the reset is complete.
Previously, that was done unconditionally in
xhci_usb2_software_lpm_test. Now that's done in
usb_reset_and_verify_device.
- Make the sysfs file usb2_hardware_lpm show the value of
udev->usb2_hw_lpm_allowed, not udev->usb2_hw_lpm_enabled, since the
set sysfs function sets the allowed variable, but the enabled
variable may not be set if the xHCI command to setup USB 2.0 Link PM
fails.
----------------------------------------------------------------
Mathias Nyman (1):
xhci: Enable LPM support only for hardwired or BESL devices
Sarah Sharp (4):
usb: Disable USB 2.0 Link PM before device reset.
xhci: Set L1 device slot on USB2 LPM enable/disable.
usb: Don't enable USB 2.0 Link PM by default.
usb: Push USB2 LPM disable on disconnect into USB core.
drivers/usb/core/driver.c | 3 +
drivers/usb/core/hub.c | 34 +++++++++
drivers/usb/core/message.c | 4 +
drivers/usb/core/sysfs.c | 6 +-
drivers/usb/host/xhci-mem.c | 10 ---
drivers/usb/host/xhci.c | 170 +++++--------------------------------------
drivers/usb/host/xhci.h | 1 +
include/linux/usb.h | 4 +-
8 files changed, 69 insertions(+), 163 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html