summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorTodd E Brandt <todd.e.brandt@linux.intel.com>2014-05-19 10:55:32 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 16:11:49 -0700
commit6fecd4f2a58c60028b1a75deefcf111516d3f836 (patch)
tree2bb7aded8a2e19b7f54330d6b8a28d910436ecd1 /include/linux/usb.h
parent0a939993bff117d3657108ca13b011fc0378aedb (diff)
downloadlwn-6fecd4f2a58c60028b1a75deefcf111516d3f836.tar.gz
lwn-6fecd4f2a58c60028b1a75deefcf111516d3f836.zip
USB: separate usb_address0 mutexes for each bus
This patch creates a separate instance of the usb_address0 mutex for each USB bus, and attaches it to the usb_bus device struct. This allows devices on separate buses to be enumerated in parallel; saving time. In the current code, there is a single, global instance of the usb_address0 mutex which is used for all devices on all buses. This isn't completely necessary, as this mutex is only needed to prevent address0 collisions for devices on the *same* bus (usb 2.0 spec, sec 4.6.1). This superfluous coverage can cause additional delay in system resume on systems with multiple hosts (up to several seconds depending on what devices are attached). Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 6b7ec376fb4d..d2465bc0e73c 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -352,6 +352,8 @@ struct usb_bus {
struct usb_bus *hs_companion; /* Companion EHCI bus, if any */
struct list_head bus_list; /* list of busses */
+ struct mutex usb_address0_mutex; /* unaddressed device mutex */
+
int bandwidth_allocated; /* on this bus: how much of the time
* reserved for periodic (intr/iso)
* requests is used, on average?