USB 3.0 Link Power Management (LPM) support
Subsystems (18)
cover USB 3.0 Link Power Management (LPM) support
The USB 3.0 bus specification added a new (optional) low power mechanism called Link Power Management (LPM). This mechanism takes advantage of the fact that USB 3.0 packets are routed, not broadcast across the bus. It does not help *at all* with USB 2.0 devices.
The idea is that when links between a parent hub and a child hub/device become idle, they should be put into a lower power state. When a USB device goes into this lower power state, it may shut down PLLs or other circuitry, since it knows it won't receive any transfers until its link is driven into the active link state (U0). Isochronous time stamp packets are also not routed to links in a lower power state. This should (theoretically) save power.
There are two lower power link states, U1 and U2. Each USB device advertises the amount of time that it will take to power up and come back to U0, in the U1/U2 Device Exit Latency values in the SuperSpeed BOS descriptor. Hubs may also incur an exit latency to bring a downstream link into U0. U2 is supposed to provide the deepest power savings, but it will also have the highest exit latency.
Either a USB device or a parent hub can request that the link go into U1 or U2. Hubs will only initiate U1 or U2 after the link has been idle for a software-programmed timeout.
It may not make sense to enable hub-initiated LPM for communications devices. These types of devices often exist to send data to the host, and the device usually knows when a transfer is likely to occur. So these devices should know when to enable device-initiated LPM. On the other hand, we don't want to introduce any latency for these devices, so enabling hub-initiated LPM may not make sense.
Introduce a new usb_driver flag to disable hub-initiated USB 3.0 LPM, and set it for all communications USB drivers. Let me know if I've missed any ones.
The policy for how to set the hub-initiated U1/U2 idle timeouts is very host specific. It depends on many factors, including endpoint types, how many hub tiers are between the device and host, and some obscure knowledge of the hardware's internal bus schedule policy. Introduce some new xHCI infrastructure, so that xHCI host vendors can add functions to implement their own timeout policies.
The only U1/U2 timeout policy I know of is for the Intel xHCI host controller. I've tried to make the patchset as host-agnostic as possible, and there's only about 100 lines of Intel-specific code in the second to last patch.
This patchset still needs a bit of polish, but the code is stable. I need to retest it since refactoring the code a bit, but I think it's ready for review.
I have verified with a USB 3.0 bus analyzer that the TI USB 3.0 hub prototype I have does go into U1 and U2 at the request of the xHCI host after the U1/U2 timeouts expire. I see the host (or device, it's hard to tell which on the Lecroy I have) send an LGO_U1 and the partner respond with an LAU (link accept).
Unfortunately, there aren't very many other devices that do go into U1 or U2. They don't break, in any obvious way, but when they are sent an LGO_U1 or LGO_U2, they always refuse by sending an LXU (link reject).
The following changes since commit 87f0194060c191f4149193833636f4fec52cdfd1:
xhci: Reset reserved command ring TRBs on cleanup. (2012-05-10 10:13:37 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git lpm-usb3-v7
for you to fetch changes up to 3c634afbbe15598cdcbf77bb9393d22ad4bfa373:
USB: Disable hub-initiated LPM for comms devices. (2012-05-16 14:23:40 -0700)
----------------------------------------------------------------
Sarah Sharp (13):
xhci: Add roothub code to set U1/U2 timeouts.
USB: Make sure to fetch the BOS desc for roothubs.
USB: Refactor code to set LPM support flag.
USB: Calculate USB 3.0 exit latencies for LPM.
USB: Allow drivers to disable hub-initiated LPM.
USB: Add support to enable/disable USB3 link states.
USB: Disable USB 3.0 LPM in critical sections.
xhci: Some Evaluate Context commands must succeed.
xhci: Reserve one command for USB3 LPM disable.
USB: Add macros for interrupt endpoint types.
xhci: Add infrastructure for host-specific LPM policies.
xhci: Add Intel U1/U2 timeout policy.
USB: Disable hub-initiated LPM for comms devices.
drivers/bluetooth/ath3k.c | 1 + drivers/bluetooth/bcm203x.c | 1 + drivers/bluetooth/bfusb.c | 1 + drivers/bluetooth/bpa10x.c | 1 + drivers/bluetooth/btusb.c | 1 + drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 + drivers/isdn/hardware/mISDN/hfcsusb.c | 1 + drivers/isdn/hisax/hfc_usb.c | 1 + drivers/isdn/hisax/st5481_init.c | 1 + drivers/net/usb/asix.c | 1 + drivers/net/usb/catc.c | 1 + drivers/net/usb/cdc-phonet.c | 1 + drivers/net/usb/cdc_eem.c | 1 + drivers/net/usb/cdc_ether.c | 1 + drivers/net/usb/cdc_ncm.c | 1 + drivers/net/usb/cdc_subset.c | 1 + drivers/net/usb/cx82310_eth.c | 1 + drivers/net/usb/dm9601.c | 1 + drivers/net/usb/gl620a.c | 1 + drivers/net/usb/hso.c | 1 + drivers/net/usb/int51x1.c | 1 + drivers/net/usb/ipheth.c | 1 + drivers/net/usb/kalmia.c | 3 +- drivers/net/usb/kaweth.c | 1 + drivers/net/usb/lg-vl600.c | 1 + drivers/net/usb/mcs7830.c | 1 + drivers/net/usb/net1080.c | 1 + drivers/net/usb/pegasus.c | 1 + drivers/net/usb/plusb.c | 1 + drivers/net/usb/qmi_wwan.c | 1 + drivers/net/usb/rndis_host.c | 1 + drivers/net/usb/rtl8150.c | 3 +- drivers/net/usb/sierra_net.c | 1 + drivers/net/usb/smsc75xx.c | 1 + drivers/net/usb/smsc95xx.c | 1 + drivers/net/usb/zaurus.c | 1 + drivers/net/wireless/at76c50x-usb.c | 1 + drivers/net/wireless/ath/ath6kl/usb.c | 1 + drivers/net/wireless/ath/ath9k/hif_usb.c | 1 + drivers/net/wireless/ath/carl9170/usb.c | 1 + drivers/net/wireless/brcm80211/brcmfmac/usb.c | 1 + drivers/net/wireless/libertas/if_usb.c | 1 + drivers/net/wireless/libertas_tf/if_usb.c | 1 + drivers/net/wireless/orinoco/orinoco_usb.c | 1 + drivers/net/wireless/p54/p54usb.c | 1 + drivers/net/wireless/rndis_wlan.c | 1 + drivers/net/wireless/rt2x00/rt2500usb.c | 1 + drivers/net/wireless/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/rt2x00/rt73usb.c | 1 + drivers/net/wireless/rtl818x/rtl8187/dev.c | 1 + drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 1 + drivers/net/wireless/zd1201.c | 1 + drivers/net/wireless/zd1211rw/zd_usb.c | 1 + drivers/usb/class/cdc-acm.c | 1 + drivers/usb/class/cdc-wdm.c | 1 + drivers/usb/core/driver.c | 71 +++ drivers/usb/core/hcd.c | 9 + drivers/usb/core/hub.c | 629 ++++++++++++++++++++++++- drivers/usb/core/message.c | 47 ++ drivers/usb/host/xhci-hub.c | 19 + drivers/usb/host/xhci-mem.c | 12 + drivers/usb/host/xhci-pci.c | 13 + drivers/usb/host/xhci-ring.c | 4 +- drivers/usb/host/xhci.c | 454 ++++++++++++++++++- drivers/usb/host/xhci.h | 14 +- include/linux/usb.h | 50 ++ include/linux/usb/ch11.h | 2 + include/linux/usb/ch9.h | 56 +++ include/linux/usb/hcd.h | 9 + 70 files changed, 1440 insertions(+), 9 deletions(-)
A message that is not in the archive (sent off-list or not yet received): cover.1337203535.git.sarah.a.sharp-VuQAYsv1563Yd54FQh9/[email protected]
RFC 5/13 USB: Allow drivers to disable hub-initiated LPM.
USB 3.0 Link Power Management (LPM) is designed to allow individual links in the bus to go into lower power states. There are two ways a link can enter a lower power state:
1. Device-initiated LPM. When a USB device decides it can go into a lower power link state, it sends a message to the parent hub, telling it to go into either U1 or U2. Device-initiated LPM is good for devices that send data to the host, like communications devices.
2. Hub-initiated LPM. After the link has been idle for a specific amount of time, the parent hub will request that the child go into a lower power state. The child can refuse that request. For example, a USB modem may want to refuse the LPM request if it is in the middle of receiving a text message. Hub-initiated LPM is good for devices where only the host initiates the data transfer, like USB printers or USB mass storage devices.
Links will be automatically placed into higher power states by the USB hubs and roothubs whenever the host starts a USB transmission.
Introduce a new usb_driver flag, disable_hub_initiated_lpm, that allows drivers to disable hub-initiated LPM.
--- include/linux/usb.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/usb.h +4 -0
@@ -875,6 +875,9 @@ struct usbdrv_wrap {* for interfaces bound to this driver. * @soft_unbind: if set to 1, the USB core will not kill URBs and disable * endpoints before calling the driver's disconnect method. +* @disable_hub_initiated_lpm: if set to 0, the USB core will not allow hubs +* to initiate lower power link state transitions when an idle timeout +* occurs. Device-initiated USB 3.0 link PM will still be allowed. * * USB interface drivers must provide a name, probe() and disconnect() * methods, and an id_table. Other driver fields are optional.
@@ -915,6 +918,7 @@ struct usb_driver {struct usbdrv_wrap drvwrap; unsigned int no_dynamic_id:1; unsigned int supports_autosuspend:1; + unsigned int disable_hub_initiated_lpm:1; unsigned int soft_unbind:1; };#define to_usb_driver (d) container_of(d, struct usb_driver, drvwrap.driver)
Signature · 1 line
1.7.9
RFC 5/13 USB: Allow drivers to disable hub-initiated LPM.
In reply to a message not in the archive[[Resending with a smaller Cc list]
USB 3.0 Link Power Management (LPM) is designed to allow individual links in the bus to go into lower power states. There are two ways a link can enter a lower power state:
1. Device-initiated LPM. When a USB device decides it can go into a lower power link state, it sends a message to the parent hub, telling it to go into either U1 or U2. Device-initiated LPM is good for devices that send data to the host, like communications devices.
2. Hub-initiated LPM. After the link has been idle for a specific amount of time, the parent hub will request that the child go into a lower power state. The child can refuse that request. For example, a USB modem may want to refuse the LPM request if it is in the middle of receiving a text message. Hub-initiated LPM is good for devices where only the host initiates the data transfer, like USB printers or USB mass storage devices.
Links will be automatically placed into higher power states by the USB hubs and roothubs whenever the host starts a USB transmission.
Introduce a new usb_driver flag, disable_hub_initiated_lpm, that allows drivers to disable hub-initiated LPM.
--- include/linux/usb.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/usb.h +4 -0
@@ -875,6 +875,9 @@ struct usbdrv_wrap {* for interfaces bound to this driver. * @soft_unbind: if set to 1, the USB core will not kill URBs and disable * endpoints before calling the driver's disconnect method. +* @disable_hub_initiated_lpm: if set to 0, the USB core will not allow hubs +* to initiate lower power link state transitions when an idle timeout +* occurs. Device-initiated USB 3.0 link PM will still be allowed. * * USB interface drivers must provide a name, probe() and disconnect() * methods, and an id_table. Other driver fields are optional.
@@ -915,6 +918,7 @@ struct usb_driver {struct usbdrv_wrap drvwrap; unsigned int no_dynamic_id:1; unsigned int supports_autosuspend:1; + unsigned int disable_hub_initiated_lpm:1; unsigned int soft_unbind:1; };#define to_usb_driver (d) container_of(d, struct usb_driver, drvwrap.driver)
Signature · 1 line
1.7.9
RFC 13/13 USB: Disable hub-initiated LPM for comms devices.
In reply to a message not in the archiveHub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer.
If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission.
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
Set the disable_hub_initiated_lpm flag for for all USB communications drivers. I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do.
--- drivers/bluetooth/ath3k.c | 1 + drivers/bluetooth/bcm203x.c | 1 + drivers/bluetooth/bfusb.c | 1 + drivers/bluetooth/bpa10x.c | 1 + drivers/bluetooth/btusb.c | 1 + drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 + drivers/isdn/hardware/mISDN/hfcsusb.c | 1 + drivers/isdn/hisax/hfc_usb.c | 1 + drivers/isdn/hisax/st5481_init.c | 1 + drivers/net/usb/asix.c | 1 + drivers/net/usb/catc.c | 1 + drivers/net/usb/cdc-phonet.c | 1 + drivers/net/usb/cdc_eem.c | 1 + drivers/net/usb/cdc_ether.c | 1 + drivers/net/usb/cdc_ncm.c | 1 + drivers/net/usb/cdc_subset.c | 1 + drivers/net/usb/cx82310_eth.c | 1 + drivers/net/usb/dm9601.c | 1 + drivers/net/usb/gl620a.c | 1 + drivers/net/usb/hso.c | 1 + drivers/net/usb/int51x1.c | 1 + drivers/net/usb/ipheth.c | 1 + drivers/net/usb/kalmia.c | 3 ++- drivers/net/usb/kaweth.c | 1 + drivers/net/usb/lg-vl600.c | 1 + drivers/net/usb/mcs7830.c | 1 + drivers/net/usb/net1080.c | 1 + drivers/net/usb/pegasus.c | 1 + drivers/net/usb/plusb.c | 1 + drivers/net/usb/qmi_wwan.c | 1 + drivers/net/usb/rndis_host.c | 1 + drivers/net/usb/rtl8150.c | 3 ++- drivers/net/usb/sierra_net.c | 1 + drivers/net/usb/smsc75xx.c | 1 + drivers/net/usb/smsc95xx.c | 1 + drivers/net/usb/zaurus.c | 1 + drivers/net/wireless/at76c50x-usb.c | 1 + drivers/net/wireless/ath/ath6kl/usb.c | 1 + drivers/net/wireless/ath/ath9k/hif_usb.c | 1 + drivers/net/wireless/ath/carl9170/usb.c | 1 + drivers/net/wireless/brcm80211/brcmfmac/usb.c | 1 + drivers/net/wireless/libertas/if_usb.c | 1 + drivers/net/wireless/libertas_tf/if_usb.c | 1 + drivers/net/wireless/orinoco/orinoco_usb.c | 1 + drivers/net/wireless/p54/p54usb.c | 1 + drivers/net/wireless/rndis_wlan.c | 1 + drivers/net/wireless/rt2x00/rt2500usb.c | 1 + drivers/net/wireless/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/rt2x00/rt73usb.c | 1 + drivers/net/wireless/rtl818x/rtl8187/dev.c | 1 + drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 1 + drivers/net/wireless/zd1201.c | 1 + drivers/net/wireless/zd1211rw/zd_usb.c | 1 + drivers/usb/class/cdc-acm.c | 1 + drivers/usb/class/cdc-wdm.c | 1 + 56 files changed, 58 insertions(+), 2 deletions(-)
drivers/bluetooth/ath3k.c +1 -0
@@ -439,6 +439,7 @@ static struct usb_driver ath3k_driver = { .probe = ath3k_probe, .disconnect = ath3k_disconnect, .id_table = ath3k_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (ath3k_driver);
drivers/bluetooth/bcm203x.c +1 -0
@@ -279,6 +279,7 @@ static struct usb_driver bcm203x_driver = { .probe = bcm203x_probe, .disconnect = bcm203x_disconnect, .id_table = bcm203x_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bcm203x_driver);
drivers/bluetooth/bfusb.c +1 -0
@@ -749,6 +749,7 @@ static struct usb_driver bfusb_driver = { .probe = bfusb_probe, .disconnect = bfusb_disconnect, .id_table = bfusb_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bfusb_driver);
drivers/bluetooth/bpa10x.c +1 -0
@@ -508,6 +508,7 @@ static struct usb_driver bpa10x_driver = { .probe = bpa10x_probe, .disconnect = bpa10x_disconnect, .id_table = bpa10x_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bpa10x_driver);
drivers/bluetooth/btusb.c +1 -0
@@ -1218,6 +1218,7 @@ static struct usb_driver btusb_driver = {#endif .id_table = btusb_table, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (btusb_driver);
drivers/isdn/gigaset/bas-gigaset.c +1 -0
@@ -148,6 +148,7 @@ static struct usb_driver gigaset_usb_driver = { .reset_resume = gigaset_post_reset, .pre_reset = gigaset_pre_reset, .post_reset = gigaset_post_reset, + .disable_hub_initiated_lpm = 1, };/* get message text for usb_submit_urb return code
drivers/isdn/gigaset/usb-gigaset.c +1 -0
@@ -124,6 +124,7 @@ static struct usb_driver gigaset_usb_driver = { .reset_resume = gigaset_resume, .pre_reset = gigaset_pre_reset, .post_reset = gigaset_resume, + .disable_hub_initiated_lpm = 1, };struct usb_cardstate {
drivers/isdn/hardware/mISDN/hfcsusb.c +1 -0
@@ -2151,6 +2151,7 @@ static struct usb_driver hfcsusb_drv = { .id_table = hfcsusb_idtab, .probe = hfcsusb_probe, .disconnect = hfcsusb_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (hfcsusb_drv);
drivers/isdn/hisax/hfc_usb.c +1 -0
@@ -1568,6 +1568,7 @@ static struct usb_driver hfc_drv = { .id_table = hfcusb_idtab, .probe = hfc_usb_probe, .disconnect = hfc_usb_disconnect, + .disable_hub_initiated_lpm = 1, };static void __exit
drivers/isdn/hisax/st5481_init.c +1 -0
@@ -182,6 +182,7 @@ static struct usb_driver st5481_usb_driver = { .probe = probe_st5481, .disconnect = disconnect_st5481, .id_table = st5481_ids, + .disable_hub_initiated_lpm = 1, };static int __init st5481_usb_init (void )
drivers/net/usb/asix.c +1 -0
@@ -1647,6 +1647,7 @@ static struct usb_driver asix_driver = { .resume = usbnet_resume, .disconnect = usbnet_disconnect, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (asix_driver);
drivers/net/usb/catc.c +1 -0
@@ -952,6 +952,7 @@ static struct usb_driver catc_driver = { .probe = catc_probe, .disconnect = catc_disconnect, .id_table = catc_id_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (catc_driver);
drivers/net/usb/cdc-phonet.c +1 -0
@@ -457,6 +457,7 @@ static struct usb_driver usbpn_driver = { .probe = usbpn_probe, .disconnect = usbpn_disconnect, .id_table = usbpn_ids, + .disable_hub_initiated_lpm = 1, };module_usb_driver (usbpn_driver);
drivers/net/usb/cdc_eem.c +1 -0
@@ -368,6 +368,7 @@ static struct usb_driver eem_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (eem_driver);
drivers/net/usb/cdc_ether.c +1 -0
@@ -623,6 +623,7 @@ static struct usb_driver cdc_driver = { .resume = usbnet_resume, .reset_resume = usbnet_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cdc_driver);
drivers/net/usb/cdc_ncm.c +1 -0
@@ -1212,6 +1212,7 @@ static struct usb_driver cdc_ncm_driver = { .resume = usbnet_resume, .reset_resume = usbnet_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static const struct ethtool_ops cdc_ncm_ethtool_ops = {
drivers/net/usb/cdc_subset.c +1 -0
@@ -336,6 +336,7 @@ static struct usb_driver cdc_subset_driver = { .resume = usbnet_resume, .disconnect = usbnet_disconnect, .id_table = products, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cdc_subset_driver);
drivers/net/usb/cx82310_eth.c +1 -0
@@ -327,6 +327,7 @@ static struct usb_driver cx82310_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cx82310_driver);
drivers/net/usb/dm9601.c +1 -0
@@ -670,6 +670,7 @@ static struct usb_driver dm9601_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (dm9601_driver);
drivers/net/usb/gl620a.c +1 -0
@@ -225,6 +225,7 @@ static struct usb_driver gl620a_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (gl620a_driver);
drivers/net/usb/hso.c +1 -0
@@ -3291,6 +3291,7 @@ static struct usb_driver hso_driver = { .resume = hso_resume, .reset_resume = hso_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static int __init hso_init (void )
drivers/net/usb/int51x1.c +1 -0
@@ -236,6 +236,7 @@ static struct usb_driver int51x1_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (int51x1_driver);
drivers/net/usb/ipheth.c +1 -0
@@ -554,6 +554,7 @@ static struct usb_driver ipheth_driver = { .probe = ipheth_probe, .disconnect = ipheth_disconnect, .id_table = ipheth_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (ipheth_driver);
drivers/net/usb/kalmia.c +2 -1
@@ -372,7 +372,8 @@ static struct usb_driver kalmia_driver = { .probe = usbnet_probe, .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, - .resume = usbnet_resume + .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (kalmia_driver);
drivers/net/usb/kaweth.c +1 -0
@@ -179,6 +179,7 @@ static struct usb_driver kaweth_driver = { .resume = kaweth_resume, .id_table = usb_klsi_table, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };typedef __u8 eth_addr_t [6 ];
drivers/net/usb/lg-vl600.c +1 -0
@@ -344,6 +344,7 @@ static struct usb_driver lg_vl600_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (lg_vl600_driver);
drivers/net/usb/mcs7830.c +1 -0
@@ -690,6 +690,7 @@ static struct usb_driver mcs7830_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .reset_resume = mcs7830_reset_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (mcs7830_driver);
drivers/net/usb/net1080.c +1 -0
@@ -587,6 +587,7 @@ static struct usb_driver net1080_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (net1080_driver);
drivers/net/usb/pegasus.c +1 -0
@@ -1489,6 +1489,7 @@ static struct usb_driver pegasus_driver = { .id_table = pegasus_ids, .suspend = pegasus_suspend, .resume = pegasus_resume, + .disable_hub_initiated_lpm = 1, };static void __init parse_id (char *id)
drivers/net/usb/plusb.c +1 -0
@@ -152,6 +152,7 @@ static struct usb_driver plusb_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (plusb_driver);
drivers/net/usb/qmi_wwan.c +1 -0
@@ -525,6 +525,7 @@ static struct usb_driver qmi_wwan_driver = { .resume = qmi_wwan_resume, .reset_resume = qmi_wwan_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static int __init qmi_wwan_init (void )
drivers/net/usb/rndis_host.c +1 -0
@@ -633,6 +633,7 @@ static struct usb_driver rndis_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rndis_driver);
drivers/net/usb/rtl8150.c +2 -1
@@ -948,7 +948,8 @@ static struct usb_driver rtl8150_driver = { .disconnect = rtl8150_disconnect, .id_table = rtl8150_table, .suspend = rtl8150_suspend, - .resume = rtl8150_resume + .resume = rtl8150_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rtl8150_driver);
drivers/net/usb/sierra_net.c +1 -0
@@ -982,6 +982,7 @@ static struct usb_driver sierra_net_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .no_dynamic_id = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (sierra_net_driver);
drivers/net/usb/smsc75xx.c +1 -0
@@ -1250,6 +1250,7 @@ static struct usb_driver smsc75xx_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .disconnect = usbnet_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (smsc75xx_driver);
drivers/net/usb/smsc95xx.c +1 -0
@@ -1297,6 +1297,7 @@ static struct usb_driver smsc95xx_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .disconnect = usbnet_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (smsc95xx_driver);
drivers/net/usb/zaurus.c +1 -0
@@ -377,6 +377,7 @@ static struct usb_driver zaurus_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (zaurus_driver);
drivers/net/wireless/at76c50x-usb.c +1 -0
@@ -2486,6 +2486,7 @@ static struct usb_driver at76_driver = { .probe = at76_probe, .disconnect = at76_disconnect, .id_table = dev_table, + .disable_hub_initiated_lpm = 1, };static int __init at76_mod_init (void )
drivers/net/wireless/ath/ath6kl/usb.c +1 -0
@@ -405,6 +405,7 @@ static struct usb_driver ath6kl_usb_driver = { .probe = ath6kl_usb_probe, .disconnect = ath6kl_usb_remove, .id_table = ath6kl_usb_ids, + .disable_hub_initiated_lpm = 1, };static int ath6kl_usb_init (void )
drivers/net/wireless/ath/ath9k/hif_usb.c +1 -0
@@ -1356,6 +1356,7 @@ static struct usb_driver ath9k_hif_usb_driver = {#endif .id_table = ath9k_hif_usb_ids, .soft_unbind = 1, + .disable_hub_initiated_lpm = 1, };int ath9k_hif_usb_init (void )
drivers/net/wireless/ath/carl9170/usb.c +1 -0
@@ -1159,6 +1159,7 @@ static struct usb_driver carl9170_driver = { .resume = carl9170_usb_resume, .reset_resume = carl9170_usb_resume,#endif /* CONFIG_PM */ + .disable_hub_initiated_lpm = 1, };module_usb_driver (carl9170_driver);
drivers/net/wireless/brcm80211/brcmfmac/usb.c +1 -0
@@ -1605,6 +1605,7 @@ static struct usb_driver brcmf_usbdrvr = { .suspend = brcmf_usb_suspend, .resume = brcmf_usb_resume, .supports_autosuspend = 1 + .disable_hub_initiated_lpm = 1, };void brcmf_usb_exit (void )
drivers/net/wireless/libertas/if_usb.c +1 -0
@@ -1180,6 +1180,7 @@ static struct usb_driver if_usb_driver = { .suspend = if_usb_suspend, .resume = if_usb_resume, .reset_resume = if_usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (if_usb_driver);
drivers/net/wireless/libertas_tf/if_usb.c +1 -0
@@ -920,6 +920,7 @@ static struct usb_driver if_usb_driver = { .id_table = if_usb_table, .suspend = if_usb_suspend, .resume = if_usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (if_usb_driver);
drivers/net/wireless/orinoco/orinoco_usb.c +1 -0
@@ -1752,6 +1752,7 @@ static struct usb_driver orinoco_driver = { .probe = ezusb_probe, .disconnect = ezusb_disconnect, .id_table = ezusb_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (orinoco_driver);
drivers/net/wireless/p54/p54usb.c +1 -0
@@ -1081,6 +1081,7 @@ static struct usb_driver p54u_driver = { .reset_resume = p54u_resume,#endif /* CONFIG_PM */ .soft_unbind = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (p54u_driver);
drivers/net/wireless/rndis_wlan.c +1 -0
@@ -3776,6 +3776,7 @@ static struct usb_driver rndis_wlan_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rndis_wlan_driver);
drivers/net/wireless/rt2x00/rt2500usb.c +1 -0
@@ -1980,6 +1980,7 @@ static struct usb_driver rt2500usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt2500usb_driver);
drivers/net/wireless/rt2x00/rt2800usb.c +1 -0
@@ -1293,6 +1293,7 @@ static struct usb_driver rt2800usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt2800usb_driver);
drivers/net/wireless/rt2x00/rt73usb.c +1 -0
@@ -2526,6 +2526,7 @@ static struct usb_driver rt73usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt73usb_driver);
drivers/net/wireless/rtl818x/rtl8187/dev.c +1 -0
@@ -1662,6 +1662,7 @@ static struct usb_driver rtl8187_driver = { .id_table = rtl8187_table, .probe = rtl8187_probe, .disconnect = __devexit_p(rtl8187_disconnect), + .disable_hub_initiated_lpm = 1, };module_usb_driver (rtl8187_driver);
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +1 -0
@@ -372,6 +372,7 @@ static struct usb_driver rtl8192cu_driver = {#ifdef CONFIG_AUTOSUSPEND .supports_autosuspend = 1, #endif + .disable_hub_initiated_lpm =1 , };module_usb_driver (rtl8192cu_driver);
drivers/net/wireless/zd1201.c +1 -0
@@ -1905,6 +1905,7 @@ static struct usb_driver zd1201_usb = { .id_table = zd1201_table, .suspend = zd1201_suspend, .resume = zd1201_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (zd1201_usb);
drivers/net/wireless/zd1211rw/zd_usb.c +1 -0
@@ -1542,6 +1542,7 @@ static struct usb_driver driver = { .disconnect = disconnect, .pre_reset = pre_reset, .post_reset = post_reset, + .disable_hub_initiated_lpm = 1, };struct workqueue_struct *zd_workqueue;
drivers/usb/class/cdc-acm.c +1 -0
@@ -1664,6 +1664,7 @@ static struct usb_driver acm_driver = {#ifdef CONFIG_PM .supports_autosuspend = 1, #endif + .disable_hub_initiated_lpm = 1, };/*
drivers/usb/class/cdc-wdm.c +1 -0
@@ -1025,6 +1025,7 @@ static struct usb_driver wdm_driver = { .post_reset = wdm_post_reset, .id_table = wdm_ids, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (wdm_driver);
Signature · 1 line
1.7.9
A message that is not in the archive (sent off-list or not yet received): 3c634afbbe15598cdcbf77bb9393d22ad4bfa373.1337203535.git.sarah.a.sharp-VuQAYsv1563Yd54FQh9/[email protected]
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Am 16.05.2012 23:55, schrieb Sarah Sharp:
Quoted 3 lines
Set the
disable_hub_initiated_lpmflag for for all USB communications drivers. I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do.
I follow the argument for class drivers. But this patch also modifies drivers for specific existing USB 2.0 only devices which are unlikely to ever grow USB 3.0 support, such as the Gigaset ISDN driver:
Quoted 2 lines
drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 +
What is the interest of setting the disable_hub_initiated_lpm flag for these?
Thanks,
Tilman
Signature · 12 lines
Tilman Schmidt E-Mail: tilman at imap.cc Bonn, Germany In theory there is no difference between theory and practice. In practice there is. (Yogi Berra) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20120517/014ce13f/attachment.pgp
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 12 lines · Tilman Schmidt
Am 16.05.2012 23:55, schrieb Sarah Sharp:
Quoted 3 lines
Set the
disable_hub_initiated_lpmflag for for all USB communications drivers. I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do.I follow the argument for class drivers. But this patch also modifies drivers for specific existing USB 2.0 only devices which are unlikely to ever grow USB 3.0 support, such as the Gigaset ISDN driver:
Quoted 2 lines
drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 +
Is there a particular reason why you think that driver is unlikely to ever get USB 3.0 support? I pretty much grabbed any USB driver that looked like a communications driver without looking too closely at the code.
Quoted 2 lines
What is the interest of setting the
disable_hub_initiated_lpmflag for these?
It's partially to lay the foundation for anyone who wants to make a USB 3.0 communications driver in the future. They're likely to start from some USB 2.0 class driver, and copy a lot of code. If they notice that flag is set in all the USB communications class drivers, they're likely to set it as well.
I'm not quite sure where the best place to provide documentation on the flag is. I've added the kernel doc comments to the structure, but maybe it needs to be documented somewhere in Documentation/usb/?
Sarah Sharp
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
I dont know, sorry,
--- On Thu, 5/17/12, Sarah Sharp <[email protected]> wrote:
From: Sarah Sharp <[email protected]>
Subject: Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
To: "Tilman Schmidt" <[email protected]>
Cc: gigaset307x-common at lists.sourceforge.net, libertas-dev at lists.infradead.org, "Greg Kroah-Hartman" <[email protected]>, linux-usb at vger.kernel.org, linux-wireless at vger.kernel.org, users at rt2x00.serialmonkey.com, linux-bluetooth at vger.kernel.org, ath9k-devel at lists.ath9k.org, "Alan Stern" <[email protected]>, "Hansjoerg Lipp" <[email protected]>, netdev at vger.kernel.org
Date: Thursday, May 17, 2012, 1:31 PM
Quoted 12 lines · Tilman Schmidt
Am 16.05.2012 23:55, schrieb Sarah Sharp:
Quoted 3 lines
Set the
disable_hub_initiated_lpmflag for for all USB communications drivers.? I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do.I follow the argument for class drivers. But this patch also modifies drivers for specific existing USB 2.0 only devices which are unlikely to ever grow USB 3.0 support, such as the Gigaset ISDN driver:
Quoted 2 lines
?
drivers/isdn/gigaset/bas-gigaset.c? ? ? ? ? ? |? ? 1 + ?drivers/isdn/gigaset/usb-gigaset.c? ? ? ? ? ? |? ? 1 +
Is there a particular reason why you think that driver is unlikely to ever get USB 3.0 support?? I pretty much grabbed any USB driver that looked like a communications driver without looking too closely at the code.
Quoted 2 lines
What is the interest of setting the
disable_hub_initiated_lpmflag for these?
It's partially to lay the foundation for anyone who wants to make a USB 3.0 communications driver in the future.? They're likely to start from some USB 2.0 class driver, and copy a lot of code.? If they notice that flag is set in all the USB communications class drivers, they're likely to set it as well.
I'm not quite sure where the best place to provide documentation on the flag is.? I've added the kernel doc comments to the structure, but maybe it needs to be documented somewhere in Documentation/usb/?
Sarah Sharp
_______________________________________________
libertas-dev mailing list
libertas-dev at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/libertas-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20120517/901b5995/attachment-0001.htm
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
In reply to Sarah SharpAm 17.05.2012 19:31, schrieb Sarah Sharp:
Quoted 7 lines · Tilman Schmidt
Quoted 6 lines
I follow the argument for class drivers. But this patch also modifies drivers for specific existing USB 2.0 only devices which are unlikely to ever grow USB 3.0 support, such as the Gigaset ISDN driver:
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 +Is there a particular reason why you think that driver is unlikely to ever get USB 3.0 support?
Actually, there is. :-)
- The USB devices driven by this driver aren't built anymore.
- Their USB interface design is quite, um, idiosyncratic, and it's pretty unlikely that anyone will reuse it. (At least I truly hope no one will.)
- Their successor models have completely different and incompatible USB interfaces which this driver is unable to handle.
Quoted 8 lines
Quoted 2 lines
What is the interest of setting the
disable_hub_initiated_lpmflag for these?It's partially to lay the foundation for anyone who wants to make a USB 3.0 communications driver in the future. They're likely to start from some USB 2.0 class driver, and copy a lot of code. If they notice that flag is set in all the USB communications class drivers, they're likely to set it as well.
You've got a point there.
Quoted 3 lines
I'm not quite sure where the best place to provide documentation on the flag is. I've added the kernel doc comments to the structure, but maybe it needs to be documented somewhere in
Documentation/usb/?
Documentation/usb/power-management.txt would seem like a natural place. Although it appears to limit itself to "suspending" in its first paragraph, it does have a section "xHCI hardware link PM" at the end already, added by Andiry Xu on 2011-09-23.
Hmmm, that section seems to suggest that LPM exists for USB2, too. Perhaps I should reconsider my attitude towards your patch.
Thanks,
Tilman
Signature · 12 lines
Tilman Schmidt E-Mail: tilman at imap.cc Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Unge?ffnet mindestens haltbar bis: (siehe R?ckseite) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20120519/39e38f4d/attachment.pgp
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 14 lines · Tilman Schmidt
Am 17.05.2012 19:31, schrieb Sarah Sharp:
Quoted 7 lines · Tilman Schmidt
Quoted 6 lines
I follow the argument for class drivers. But this patch also modifies drivers for specific existing USB 2.0 only devices which are unlikely to ever grow USB 3.0 support, such as the Gigaset ISDN driver:
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 +Is there a particular reason why you think that driver is unlikely to ever get USB 3.0 support?
Quoted 7 lines
Actually, there is. :-)
- The USB devices driven by this driver aren't built anymore.
- Their USB interface design is quite, um, idiosyncratic, and it's pretty unlikely that anyone will reuse it. (At least I truly hope no one will.)
- Their successor models have completely different and incompatible USB interfaces which this driver is unable to handle.
I see!
Quoted 11 lines
Quoted 8 lines
Quoted 2 lines
What is the interest of setting the
disable_hub_initiated_lpmflag for these?It's partially to lay the foundation for anyone who wants to make a USB 3.0 communications driver in the future. They're likely to start from some USB 2.0 class driver, and copy a lot of code. If they notice that flag is set in all the USB communications class drivers, they're likely to set it as well.
You've got a point there.
Quoted 8 lines
Quoted 3 lines
I'm not quite sure where the best place to provide documentation on the flag is. I've added the kernel doc comments to the structure, but maybe it needs to be documented somewhere in
Documentation/usb/?
Documentation/usb/power-management.txtwould seem like a natural place. Although it appears to limit itself to "suspending" in its first paragraph, it does have a section "xHCI hardware link PM" at the end already, added by Andiry Xu on 2011-09-23.
Ok, I'll send a separate patch to add documentation here, after the 3.5 merge window. (I just sent the pull request for the USB 3.0 LPM patches off to Greg.)
Quoted 2 lines
Hmmm, that section seems to suggest that LPM exists for USB2, too. Perhaps I should reconsider my attitude towards your patch.
The patchset doesn't change the USB 2.0 LPM behavior at all. USB 2.0 doesn't have hub initiated LPM, because that would mean changing existing USB 2.0 hub IP. Only devices attached directly to the roothub will be able to do USB 2.0 LPM. Also, devices have to specifically say they implement the USB 2.1 LPM extensions, so it's unlikely devices supported by your driver implement USB 2.0 LPM.
Sarah Sharp
RFC 13/13 USB: Disable hub-initiated LPM for comms devices.
In reply to a message not in the archive[Resending with a smaller Cc list]
Hub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer.
If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission.
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
Set the disable_hub_initiated_lpm flag for for all USB communications drivers. I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do.
--- drivers/bluetooth/ath3k.c | 1 + drivers/bluetooth/bcm203x.c | 1 + drivers/bluetooth/bfusb.c | 1 + drivers/bluetooth/bpa10x.c | 1 + drivers/bluetooth/btusb.c | 1 + drivers/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 + drivers/isdn/hardware/mISDN/hfcsusb.c | 1 + drivers/isdn/hisax/hfc_usb.c | 1 + drivers/isdn/hisax/st5481_init.c | 1 + drivers/net/usb/asix.c | 1 + drivers/net/usb/catc.c | 1 + drivers/net/usb/cdc-phonet.c | 1 + drivers/net/usb/cdc_eem.c | 1 + drivers/net/usb/cdc_ether.c | 1 + drivers/net/usb/cdc_ncm.c | 1 + drivers/net/usb/cdc_subset.c | 1 + drivers/net/usb/cx82310_eth.c | 1 + drivers/net/usb/dm9601.c | 1 + drivers/net/usb/gl620a.c | 1 + drivers/net/usb/hso.c | 1 + drivers/net/usb/int51x1.c | 1 + drivers/net/usb/ipheth.c | 1 + drivers/net/usb/kalmia.c | 3 ++- drivers/net/usb/kaweth.c | 1 + drivers/net/usb/lg-vl600.c | 1 + drivers/net/usb/mcs7830.c | 1 + drivers/net/usb/net1080.c | 1 + drivers/net/usb/pegasus.c | 1 + drivers/net/usb/plusb.c | 1 + drivers/net/usb/qmi_wwan.c | 1 + drivers/net/usb/rndis_host.c | 1 + drivers/net/usb/rtl8150.c | 3 ++- drivers/net/usb/sierra_net.c | 1 + drivers/net/usb/smsc75xx.c | 1 + drivers/net/usb/smsc95xx.c | 1 + drivers/net/usb/zaurus.c | 1 + drivers/net/wireless/at76c50x-usb.c | 1 + drivers/net/wireless/ath/ath6kl/usb.c | 1 + drivers/net/wireless/ath/ath9k/hif_usb.c | 1 + drivers/net/wireless/ath/carl9170/usb.c | 1 + drivers/net/wireless/brcm80211/brcmfmac/usb.c | 1 + drivers/net/wireless/libertas/if_usb.c | 1 + drivers/net/wireless/libertas_tf/if_usb.c | 1 + drivers/net/wireless/orinoco/orinoco_usb.c | 1 + drivers/net/wireless/p54/p54usb.c | 1 + drivers/net/wireless/rndis_wlan.c | 1 + drivers/net/wireless/rt2x00/rt2500usb.c | 1 + drivers/net/wireless/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/rt2x00/rt73usb.c | 1 + drivers/net/wireless/rtl818x/rtl8187/dev.c | 1 + drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 1 + drivers/net/wireless/zd1201.c | 1 + drivers/net/wireless/zd1211rw/zd_usb.c | 1 + drivers/usb/class/cdc-acm.c | 1 + drivers/usb/class/cdc-wdm.c | 1 + 56 files changed, 58 insertions(+), 2 deletions(-)
drivers/bluetooth/ath3k.c +1 -0
@@ -439,6 +439,7 @@ static struct usb_driver ath3k_driver = { .probe = ath3k_probe, .disconnect = ath3k_disconnect, .id_table = ath3k_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (ath3k_driver);
drivers/bluetooth/bcm203x.c +1 -0
@@ -279,6 +279,7 @@ static struct usb_driver bcm203x_driver = { .probe = bcm203x_probe, .disconnect = bcm203x_disconnect, .id_table = bcm203x_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bcm203x_driver);
drivers/bluetooth/bfusb.c +1 -0
@@ -749,6 +749,7 @@ static struct usb_driver bfusb_driver = { .probe = bfusb_probe, .disconnect = bfusb_disconnect, .id_table = bfusb_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bfusb_driver);
drivers/bluetooth/bpa10x.c +1 -0
@@ -508,6 +508,7 @@ static struct usb_driver bpa10x_driver = { .probe = bpa10x_probe, .disconnect = bpa10x_disconnect, .id_table = bpa10x_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (bpa10x_driver);
drivers/bluetooth/btusb.c +1 -0
@@ -1218,6 +1218,7 @@ static struct usb_driver btusb_driver = {#endif .id_table = btusb_table, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (btusb_driver);
drivers/isdn/gigaset/bas-gigaset.c +1 -0
@@ -148,6 +148,7 @@ static struct usb_driver gigaset_usb_driver = { .reset_resume = gigaset_post_reset, .pre_reset = gigaset_pre_reset, .post_reset = gigaset_post_reset, + .disable_hub_initiated_lpm = 1, };/* get message text for usb_submit_urb return code
drivers/isdn/gigaset/usb-gigaset.c +1 -0
@@ -124,6 +124,7 @@ static struct usb_driver gigaset_usb_driver = { .reset_resume = gigaset_resume, .pre_reset = gigaset_pre_reset, .post_reset = gigaset_resume, + .disable_hub_initiated_lpm = 1, };struct usb_cardstate {
drivers/isdn/hardware/mISDN/hfcsusb.c +1 -0
@@ -2151,6 +2151,7 @@ static struct usb_driver hfcsusb_drv = { .id_table = hfcsusb_idtab, .probe = hfcsusb_probe, .disconnect = hfcsusb_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (hfcsusb_drv);
drivers/isdn/hisax/hfc_usb.c +1 -0
@@ -1568,6 +1568,7 @@ static struct usb_driver hfc_drv = { .id_table = hfcusb_idtab, .probe = hfc_usb_probe, .disconnect = hfc_usb_disconnect, + .disable_hub_initiated_lpm = 1, };static void __exit
drivers/isdn/hisax/st5481_init.c +1 -0
@@ -182,6 +182,7 @@ static struct usb_driver st5481_usb_driver = { .probe = probe_st5481, .disconnect = disconnect_st5481, .id_table = st5481_ids, + .disable_hub_initiated_lpm = 1, };static int __init st5481_usb_init (void )
drivers/net/usb/asix.c +1 -0
@@ -1647,6 +1647,7 @@ static struct usb_driver asix_driver = { .resume = usbnet_resume, .disconnect = usbnet_disconnect, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (asix_driver);
drivers/net/usb/catc.c +1 -0
@@ -952,6 +952,7 @@ static struct usb_driver catc_driver = { .probe = catc_probe, .disconnect = catc_disconnect, .id_table = catc_id_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (catc_driver);
drivers/net/usb/cdc-phonet.c +1 -0
@@ -457,6 +457,7 @@ static struct usb_driver usbpn_driver = { .probe = usbpn_probe, .disconnect = usbpn_disconnect, .id_table = usbpn_ids, + .disable_hub_initiated_lpm = 1, };module_usb_driver (usbpn_driver);
drivers/net/usb/cdc_eem.c +1 -0
@@ -368,6 +368,7 @@ static struct usb_driver eem_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (eem_driver);
drivers/net/usb/cdc_ether.c +1 -0
@@ -623,6 +623,7 @@ static struct usb_driver cdc_driver = { .resume = usbnet_resume, .reset_resume = usbnet_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cdc_driver);
drivers/net/usb/cdc_ncm.c +1 -0
@@ -1212,6 +1212,7 @@ static struct usb_driver cdc_ncm_driver = { .resume = usbnet_resume, .reset_resume = usbnet_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static const struct ethtool_ops cdc_ncm_ethtool_ops = {
drivers/net/usb/cdc_subset.c +1 -0
@@ -336,6 +336,7 @@ static struct usb_driver cdc_subset_driver = { .resume = usbnet_resume, .disconnect = usbnet_disconnect, .id_table = products, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cdc_subset_driver);
drivers/net/usb/cx82310_eth.c +1 -0
@@ -327,6 +327,7 @@ static struct usb_driver cx82310_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (cx82310_driver);
drivers/net/usb/dm9601.c +1 -0
@@ -670,6 +670,7 @@ static struct usb_driver dm9601_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (dm9601_driver);
drivers/net/usb/gl620a.c +1 -0
@@ -225,6 +225,7 @@ static struct usb_driver gl620a_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (gl620a_driver);
drivers/net/usb/hso.c +1 -0
@@ -3291,6 +3291,7 @@ static struct usb_driver hso_driver = { .resume = hso_resume, .reset_resume = hso_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static int __init hso_init (void )
drivers/net/usb/int51x1.c +1 -0
@@ -236,6 +236,7 @@ static struct usb_driver int51x1_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (int51x1_driver);
drivers/net/usb/ipheth.c +1 -0
@@ -554,6 +554,7 @@ static struct usb_driver ipheth_driver = { .probe = ipheth_probe, .disconnect = ipheth_disconnect, .id_table = ipheth_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (ipheth_driver);
drivers/net/usb/kalmia.c +2 -1
@@ -372,7 +372,8 @@ static struct usb_driver kalmia_driver = { .probe = usbnet_probe, .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, - .resume = usbnet_resume + .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (kalmia_driver);
drivers/net/usb/kaweth.c +1 -0
@@ -179,6 +179,7 @@ static struct usb_driver kaweth_driver = { .resume = kaweth_resume, .id_table = usb_klsi_table, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };typedef __u8 eth_addr_t [6 ];
drivers/net/usb/lg-vl600.c +1 -0
@@ -344,6 +344,7 @@ static struct usb_driver lg_vl600_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (lg_vl600_driver);
drivers/net/usb/mcs7830.c +1 -0
@@ -690,6 +690,7 @@ static struct usb_driver mcs7830_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .reset_resume = mcs7830_reset_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (mcs7830_driver);
drivers/net/usb/net1080.c +1 -0
@@ -587,6 +587,7 @@ static struct usb_driver net1080_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (net1080_driver);
drivers/net/usb/pegasus.c +1 -0
@@ -1489,6 +1489,7 @@ static struct usb_driver pegasus_driver = { .id_table = pegasus_ids, .suspend = pegasus_suspend, .resume = pegasus_resume, + .disable_hub_initiated_lpm = 1, };static void __init parse_id (char *id)
drivers/net/usb/plusb.c +1 -0
@@ -152,6 +152,7 @@ static struct usb_driver plusb_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (plusb_driver);
drivers/net/usb/qmi_wwan.c +1 -0
@@ -525,6 +525,7 @@ static struct usb_driver qmi_wwan_driver = { .resume = qmi_wwan_resume, .reset_resume = qmi_wwan_resume, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };static int __init qmi_wwan_init (void )
drivers/net/usb/rndis_host.c +1 -0
@@ -633,6 +633,7 @@ static struct usb_driver rndis_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rndis_driver);
drivers/net/usb/rtl8150.c +2 -1
@@ -948,7 +948,8 @@ static struct usb_driver rtl8150_driver = { .disconnect = rtl8150_disconnect, .id_table = rtl8150_table, .suspend = rtl8150_suspend, - .resume = rtl8150_resume + .resume = rtl8150_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rtl8150_driver);
drivers/net/usb/sierra_net.c +1 -0
@@ -982,6 +982,7 @@ static struct usb_driver sierra_net_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .no_dynamic_id = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (sierra_net_driver);
drivers/net/usb/smsc75xx.c +1 -0
@@ -1250,6 +1250,7 @@ static struct usb_driver smsc75xx_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .disconnect = usbnet_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (smsc75xx_driver);
drivers/net/usb/smsc95xx.c +1 -0
@@ -1297,6 +1297,7 @@ static struct usb_driver smsc95xx_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .disconnect = usbnet_disconnect, + .disable_hub_initiated_lpm = 1, };module_usb_driver (smsc95xx_driver);
drivers/net/usb/zaurus.c +1 -0
@@ -377,6 +377,7 @@ static struct usb_driver zaurus_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (zaurus_driver);
drivers/net/wireless/at76c50x-usb.c +1 -0
@@ -2486,6 +2486,7 @@ static struct usb_driver at76_driver = { .probe = at76_probe, .disconnect = at76_disconnect, .id_table = dev_table, + .disable_hub_initiated_lpm = 1, };static int __init at76_mod_init (void )
drivers/net/wireless/ath/ath6kl/usb.c +1 -0
@@ -405,6 +405,7 @@ static struct usb_driver ath6kl_usb_driver = { .probe = ath6kl_usb_probe, .disconnect = ath6kl_usb_remove, .id_table = ath6kl_usb_ids, + .disable_hub_initiated_lpm = 1, };static int ath6kl_usb_init (void )
drivers/net/wireless/ath/ath9k/hif_usb.c +1 -0
@@ -1356,6 +1356,7 @@ static struct usb_driver ath9k_hif_usb_driver = {#endif .id_table = ath9k_hif_usb_ids, .soft_unbind = 1, + .disable_hub_initiated_lpm = 1, };int ath9k_hif_usb_init (void )
drivers/net/wireless/ath/carl9170/usb.c +1 -0
@@ -1159,6 +1159,7 @@ static struct usb_driver carl9170_driver = { .resume = carl9170_usb_resume, .reset_resume = carl9170_usb_resume,#endif /* CONFIG_PM */ + .disable_hub_initiated_lpm = 1, };module_usb_driver (carl9170_driver);
drivers/net/wireless/brcm80211/brcmfmac/usb.c +1 -0
@@ -1605,6 +1605,7 @@ static struct usb_driver brcmf_usbdrvr = { .suspend = brcmf_usb_suspend, .resume = brcmf_usb_resume, .supports_autosuspend = 1 + .disable_hub_initiated_lpm = 1, };void brcmf_usb_exit (void )
drivers/net/wireless/libertas/if_usb.c +1 -0
@@ -1180,6 +1180,7 @@ static struct usb_driver if_usb_driver = { .suspend = if_usb_suspend, .resume = if_usb_resume, .reset_resume = if_usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (if_usb_driver);
drivers/net/wireless/libertas_tf/if_usb.c +1 -0
@@ -920,6 +920,7 @@ static struct usb_driver if_usb_driver = { .id_table = if_usb_table, .suspend = if_usb_suspend, .resume = if_usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (if_usb_driver);
drivers/net/wireless/orinoco/orinoco_usb.c +1 -0
@@ -1752,6 +1752,7 @@ static struct usb_driver orinoco_driver = { .probe = ezusb_probe, .disconnect = ezusb_disconnect, .id_table = ezusb_table, + .disable_hub_initiated_lpm = 1, };module_usb_driver (orinoco_driver);
drivers/net/wireless/p54/p54usb.c +1 -0
@@ -1081,6 +1081,7 @@ static struct usb_driver p54u_driver = { .reset_resume = p54u_resume,#endif /* CONFIG_PM */ .soft_unbind = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (p54u_driver);
drivers/net/wireless/rndis_wlan.c +1 -0
@@ -3776,6 +3776,7 @@ static struct usb_driver rndis_wlan_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rndis_wlan_driver);
drivers/net/wireless/rt2x00/rt2500usb.c +1 -0
@@ -1980,6 +1980,7 @@ static struct usb_driver rt2500usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt2500usb_driver);
drivers/net/wireless/rt2x00/rt2800usb.c +1 -0
@@ -1293,6 +1293,7 @@ static struct usb_driver rt2800usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt2800usb_driver);
drivers/net/wireless/rt2x00/rt73usb.c +1 -0
@@ -2526,6 +2526,7 @@ static struct usb_driver rt73usb_driver = { .disconnect = rt2x00usb_disconnect, .suspend = rt2x00usb_suspend, .resume = rt2x00usb_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (rt73usb_driver);
drivers/net/wireless/rtl818x/rtl8187/dev.c +1 -0
@@ -1662,6 +1662,7 @@ static struct usb_driver rtl8187_driver = { .id_table = rtl8187_table, .probe = rtl8187_probe, .disconnect = __devexit_p(rtl8187_disconnect), + .disable_hub_initiated_lpm = 1, };module_usb_driver (rtl8187_driver);
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +1 -0
@@ -372,6 +372,7 @@ static struct usb_driver rtl8192cu_driver = {#ifdef CONFIG_AUTOSUSPEND .supports_autosuspend = 1, #endif + .disable_hub_initiated_lpm =1 , };module_usb_driver (rtl8192cu_driver);
drivers/net/wireless/zd1201.c +1 -0
@@ -1905,6 +1905,7 @@ static struct usb_driver zd1201_usb = { .id_table = zd1201_table, .suspend = zd1201_suspend, .resume = zd1201_resume, + .disable_hub_initiated_lpm = 1, };module_usb_driver (zd1201_usb);
drivers/net/wireless/zd1211rw/zd_usb.c +1 -0
@@ -1542,6 +1542,7 @@ static struct usb_driver driver = { .disconnect = disconnect, .pre_reset = pre_reset, .post_reset = post_reset, + .disable_hub_initiated_lpm = 1, };struct workqueue_struct *zd_workqueue;
drivers/usb/class/cdc-acm.c +1 -0
@@ -1664,6 +1664,7 @@ static struct usb_driver acm_driver = {#ifdef CONFIG_PM .supports_autosuspend = 1, #endif + .disable_hub_initiated_lpm = 1, };/*
drivers/usb/class/cdc-wdm.c +1 -0
@@ -1025,6 +1025,7 @@ static struct usb_driver wdm_driver = { .post_reset = wdm_post_reset, .id_table = wdm_ids, .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, };module_usb_driver (wdm_driver);
Signature · 1 line
1.7.9
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 16 lines · Sarah Sharp
[Resending with a smaller Cc list]
Hub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer.
If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission.
Quoted 4 lines
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
How is the USB core on Windows determining that LPM should be turned off for these devices? Surely they aren't modifying each individual driver like this is, right? Any way we also can do this in the core?
Or, turn it around the other way, and only enable it if we know it's safe to do so, in each driver, but I guess that would be even messier.
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Sarah Sharp
[Resending with a smaller Cc list]
Hub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer.
If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission.
Quoted 8 lines
Quoted 4 lines
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
How is the USB core on Windows determining that LPM should be turned off for these devices? Surely they aren't modifying each individual driver like this is, right? Any way we also can do this in the core?
No, I don't think they're modifying individual drivers. Maybe they placed a shim/filter driver below other drivers?
Basically, I don't know the exact details of what the Windows folks are doing. The recommendation from the Intel Windows team was simply to turn hub-initiated LPM off for "all communications devices". Perhaps the Windows USB core is looking for specific USB class codes? Or maybe it has some older API that lets the core know it's a communications device?
I'm not really sure we can do it in the USB core with out basically duplicating all the class/PID/VID matching in the communications driver. I think just adding a flag might be the best way. I'm open to suggestions though.
Quoted 2 lines
Or, turn it around the other way, and only enable it if we know it's safe to do so, in each driver, but I guess that would be even messier.
Yeah, I think it would be messier.
Sarah Sharp
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 23 lines · Sarah Sharp
Quoted 22 lines · Greg Kroah-Hartman
Quoted 20 lines · Sarah Sharp
[Resending with a smaller Cc list]
Hub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer.
If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission.
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
Quoted 6 lines
Quoted 3 lines
How is the USB core on Windows determining that LPM should be turned off for these devices? Surely they aren't modifying each individual driver like this is, right? Any way we also can do this in the core?
No, I don't think they're modifying individual drivers. Maybe they placed a shim/filter driver below other drivers?
They can do this in their driver by just watching the device class type.
Quoted 11 lines
Basically, I don't know the exact details of what the Windows folks are doing. The recommendation from the Intel Windows team was simply to turn hub-initiated LPM off for "all communications devices". Perhaps the Windows USB core is looking for specific USB class codes? Or maybe it has some older API that lets the core know it's a communications device?
I'm not really sure we can do it in the USB core with out basically duplicating all the class/PID/VID matching in the communications driver. I think just adding a flag might be the best way. I'm open to suggestions though.
You can detect something as "simple" as a class type, which I bet is all that Windows is going to be able to do as well.
Quoted 4 lines
Quoted 2 lines
Or, turn it around the other way, and only enable it if we know it's safe to do so, in each driver, but I guess that would be even messier.
Yeah, I think it would be messier.
Ok, this is probably the best solution for us as well, sorry for the noise.
greg k-h
Re: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 32 lines · Greg Kroah-Hartman
Quoted 7 lines · Sarah Sharp
Quoted 6 lines · Greg Kroah-Hartman
Quoted 4 lines · Sarah Sharp
The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux.
Quoted 6 lines
Quoted 3 lines
How is the USB core on Windows determining that LPM should be turned off for these devices? Surely they aren't modifying each individual driver like this is, right? Any way we also can do this in the core?
No, I don't think they're modifying individual drivers. Maybe they placed a shim/filter driver below other drivers?
They can do this in their driver by just watching the device class type.
Quoted 11 lines
Basically, I don't know the exact details of what the Windows folks are doing. The recommendation from the Intel Windows team was simply to turn hub-initiated LPM off for "all communications devices". Perhaps the Windows USB core is looking for specific USB class codes? Or maybe it has some older API that lets the core know it's a communications device?
I'm not really sure we can do it in the USB core with out basically duplicating all the class/PID/VID matching in the communications driver. I think just adding a flag might be the best way. I'm open to suggestions though.
You can detect something as "simple" as a class type, which I bet is all that Windows is going to be able to do as well.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Or, turn it around the other way, and only enable it if we know it's safe to do so, in each driver, but I guess that would be even messier.
Yeah, I think it would be messier.
Ok, this is probably the best solution for us as well, sorry for the noise.
No worries. :)
One of the problems with this patch is that several mailing lists rejected it because of the large number of recipients in the Cc list, even when just the mailing lists were on the Cc list. Should I break it up into a series of patches per driver?
Also, do I need to wait on acks from the other maintainers for this change? My instinct is no, since it shouldn't change the behavior of their drivers with the USB devices that are out there today, but I don't want to step on anyone's toes.
Sarah Sharp
Greg Kroah-Hartman
maintainerRe: [RFC 13/13] USB: Disable hub-initiated LPM for comms devices.
Quoted 4 lines · Sarah Sharp
One of the problems with this patch is that several mailing lists rejected it because of the large number of recipients in the Cc list, even when just the mailing lists were on the Cc list. Should I break it up into a series of patches per driver?
No need to do that, I can just take it.
Quoted 4 lines
Also, do I need to wait on acks from the other maintainers for this change? My instinct is no, since it shouldn't change the behavior of their drivers with the USB devices that are out there today, but I don't want to step on anyone's toes.
Don't worry about it, we change USB drivers in other trees all the time :)
greg k-h