lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 16 May 2012 15:45:26 -0700
From:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-usb@...r.kernel.org, Alan Stern <stern@...land.harvard.edu>,
	linux-bluetooth@...r.kernel.org,
	gigaset307x-common@...ts.sourceforge.net, netdev@...r.kernel.org,
	linux-wireless@...r.kernel.org, ath9k-devel@...ts.ath9k.org,
	libertas-dev@...ts.infradead.org, users@...x00.serialmonkey.com
Subject: [RFC 05/13] USB: Allow drivers to disable hub-initiated LPM.

[[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.

Signed-off-by: Sarah Sharp <sarah.a.sharp@...ux.intel.com>
Cc: Marcel Holtmann <marcel@...tmann.org>
Cc: Gustavo Padovan <gustavo@...ovan.org>
Cc: Johan Hedberg <johan.hedberg@...il.com>
Cc: Hansjoerg Lipp <hjlipp@....de>
Cc: Tilman Schmidt <tilman@...p.cc>
Cc: Karsten Keil <isdn@...ux-pingi.de>
Cc: Oliver Neukum <oliver@...kum.name>
Cc: Peter Korsgaard <jacmet@...site.dk>
Cc: Jan Dumon <j.dumon@...ion.com>
Cc: Petko Manolov <petkan@...rs.sourceforge.net>
Cc: Steve Glendinning <steve.glendinning@...c.com>
Cc: "John W. Linville" <linville@...driver.com>
Cc: Kalle Valo <kvalo@....qualcomm.com>
Cc: "Luis R. Rodriguez" <mcgrof@....qualcomm.com>
Cc: Jouni Malinen <jouni@....qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@....qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@....qualcomm.com>
Cc: Christian Lamparter <chunkeey@...glemail.com>
Cc: Brett Rudley <brudley@...adcom.com>
Cc: Roland Vossen <rvossen@...adcom.com>
Cc: Arend van Spriel <arend@...adcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@...adcom.com>
Cc: Kan Yan <kanyan@...adcom.com>
Cc: Dan Williams <dcbw@...hat.com>
Cc: Jussi Kivilinna <jussi.kivilinna@...et.fi>
Cc: Ivo van Doorn <IvDoorn@...il.com>
Cc: Gertjan van Wingerde <gwingerde@...il.com>
Cc: Helmut Schaa <helmut.schaa@...glemail.com>
Cc: Herton Ronaldo Krzesinski <herton@...onical.com>
Cc: Hin-Tak Leung <htl10@...rs.sourceforge.net>
Cc: Larry Finger <Larry.Finger@...inger.net>
Cc: Chaoming Li <chaoming_li@...lsil.com.cn>
Cc: Daniel Drake <dsd@...too.org>
Cc: Ulrich Kunitz <kune@...ne-taler.de>
Cc: linux-bluetooth@...r.kernel.org
Cc: gigaset307x-common@...ts.sourceforge.net
Cc: netdev@...r.kernel.org
Cc: linux-usb@...r.kernel.org
Cc: linux-wireless@...r.kernel.org
Cc: ath9k-devel@...ts.ath9k.org
Cc: libertas-dev@...ts.infradead.org
Cc: users@...x00.serialmonkey.com
---
 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 eb46077..998c276 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -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)
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists