From e1f12eb6ba6f1e74007eb01ed26fad7c5239d62b Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Mon, 23 Apr 2012 10:08:51 -0700 Subject: 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 Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: Hansjoerg Lipp Cc: Tilman Schmidt Cc: Karsten Keil Cc: Peter Korsgaard Cc: Jan Dumon Cc: Petko Manolov Cc: Steve Glendinning Cc: "John W. Linville" Cc: Kalle Valo Cc: "Luis R. Rodriguez" Cc: Jouni Malinen Cc: Vasanthakumar Thiagarajan Cc: Senthil Balasubramanian Cc: Christian Lamparter Cc: Brett Rudley Cc: Roland Vossen Cc: Arend van Spriel Cc: "Franky (Zhenhui) Lin" Cc: Kan Yan Cc: Dan Williams Cc: Jussi Kivilinna Cc: Ivo van Doorn Cc: Gertjan van Wingerde Cc: Helmut Schaa Cc: Herton Ronaldo Krzesinski Cc: Hin-Tak Leung Cc: Larry Finger Cc: Chaoming Li Cc: Daniel Drake Cc: Ulrich Kunitz Signed-off-by: Sarah Sharp --- 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 + 5 files changed, 5 insertions(+) (limited to 'drivers/bluetooth') diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 57fd867553d7..2812b152d6e9 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -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); diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 1e742a50e2cd..37ae175162f3 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c @@ -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); diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index b8ac1c549a1c..32e825144fe9 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c @@ -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); diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index d894340a7601..609861a53c28 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c @@ -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); diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 9217121362e1..461c68bc4dd7 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -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); -- cgit v1.2.3