diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-04-23 10:08:51 -0700 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-05-18 15:41:57 -0700 |
commit | 8afa408cba5c474696df6307a64b1c612bbcadbc (patch) | |
tree | 79a1b9d2d82d2d1e6ec583fec30d5ecd561a6202 /include/linux/usb.h | |
parent | 51e0a01206613ad80a3841388ecfa46476dabdf5 (diff) | |
download | linux-3.10-8afa408cba5c474696df6307a64b1c612bbcadbc.tar.gz linux-3.10-8afa408cba5c474696df6307a64b1c612bbcadbc.tar.bz2 linux-3.10-8afa408cba5c474696df6307a64b1c612bbcadbc.zip |
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.
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: Oliver Neukum <oliver@neukum.name>
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>
Cc: linux-bluetooth@vger.kernel.org
Cc: gigaset307x-common@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: ath9k-devel@lists.ath9k.org
Cc: libertas-dev@lists.infradead.org
Cc: users@rt2x00.serialmonkey.com
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index e6c815590fd..22e7b53123e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -879,6 +879,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. @@ -919,6 +922,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) |