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/isdn/gigaset/bas-gigaset.c | 1 + drivers/isdn/gigaset/usb-gigaset.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers/isdn/gigaset') diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index afa080258bfa..17ea0177a529 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -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 diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 049da67f6392..78f81e8a5be6 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -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 { -- cgit v1.2.3