]> git.baikalelectronics.ru Git - kernel.git/commit
USB: separate usb_address0 mutexes for each bus
authorTodd E Brandt <todd.e.brandt@linux.intel.com>
Mon, 19 May 2014 17:55:32 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 23:11:49 +0000 (16:11 -0700)
commit992ccab0d54573cc09ed3989dc5959f1d295902c
tree2bb7aded8a2e19b7f54330d6b8a28d910436ecd1
parent04ee411808c371b2e3c3ef00c54dfce979711565
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>
drivers/usb/core/hcd.c
drivers/usb/core/hub.c
include/linux/usb.h