USB: Disable hub-initiated LPM for comms devices.
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. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Jan Dumon <j.dumon@option.com> Cc: Petko Manolov <petkan@users.sourceforge.net> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Brett Rudley <brudley@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com> Cc: Kan Yan <kanyan@broadcom.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Herton Ronaldo Krzesinski <herton@canonical.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Daniel Drake <dsd@gentoo.org> Cc: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user