linux-stable/drivers/usb
Martin Liu 8c97a46af0 driver core: hold dev's parent lock when needed
SoC have internal I/O buses that can't be proved for devices. The
devices on the buses can be accessed directly without additinal
configuration required. This type of bus is represented as
"simple-bus". In some platforms, we name "soc" with "simple-bus"
attribute and many devices are hooked under it described in DT
(device tree).

In commit bf74ad5bc4 ("Hold the device's parent's lock during
probe and remove") to solve USB subsystem lock sequence since
USB device's characteristic. Thus "soc" needs to be locked
whenever a device and driver's probing happen under "soc" bus.
During this period, an async driver tries to probe a device which
is under the "soc" bus would be blocked until previous driver
finish the probing and release "soc" lock. And the next probing
under the "soc" bus need to wait for async finish. Because of
that, driver's async probe for init time improvement will be
shadowed.

Since many devices don't have USB devices' characteristic, they
actually don't need parent's lock. Thus, we introduce a lock flag
in bus_type struct and driver core would lock the parent lock base
on the flag. For USB, we set this flag in usb_bus_type to keep
original lock behavior in driver core.

Async probe could have more benefit after this patch.

Signed-off-by: Martin Liu <liumartin@google.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-31 10:12:07 +02:00
..
atm USB: atm: fix up some remaining DEVICE_ATTR() usage 2018-01-24 08:49:52 +01:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
chipidea usb: chipidea: imx: Fix ULPI on imx53 2018-03-29 12:03:01 +02:00
class usb: cdc_acm: prevent race at write to acm while system resumes 2018-02-16 07:52:55 +01:00
common usb: common: Small class for USB role switches 2018-03-22 13:40:10 +01:00
core driver core: hold dev's parent lock when needed 2018-05-31 10:12:07 +02:00
dwc2 usb: changes for v4.17 merge window 2018-03-23 13:33:09 +01:00
dwc3 usb: dwc3: gadget: never call ->complete() from ->ep_queue() 2018-03-26 13:22:09 +02:00
early usb: early: Correct the endpoint type value for bulk in endpoint 2017-12-07 16:03:15 +01:00
gadget USB/PHY patches for 4.17-rc1 2018-04-04 17:55:35 -07:00
host xhci: Fix Kernel oops in xhci dbgtty 2018-04-22 15:23:37 +02:00
image USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
isp1760 usb: isp1760: Use kasprintf 2018-03-09 09:40:21 -08:00
misc TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
mon usb: usbmon: Read text within supplied buffer size 2018-03-09 07:40:38 -08:00
mtu3 usb: mtu3: fix semicolon.cocci warnings 2018-01-16 10:01:01 +01:00
musb USB: musb: dsps: drop duplicate phy initialisation 2018-04-23 16:02:13 +02:00
phy usb: phy: ab8500: Drop AB8540/9540 support 2018-03-22 13:51:39 +01:00
renesas_usbhs usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path 2018-02-15 18:43:57 +01:00
roles usb: roles: Fix return value check in intel_xhci_usb_probe() 2018-03-26 11:59:25 +02:00
serial USB: serial: ftdi_sio: use jtag quirk for Arrow USB Blaster 2018-04-16 11:19:21 +02:00
storage USB: storage: Add JMicron bridge 152d:2567 to unusual_devs.h 2018-03-08 10:03:04 -08:00
typec usb: typec: ucsi: Increase command completion timeout value 2018-04-22 14:54:50 +02:00
usbip usbip: usbip_event: fix to not print kernel pointer address 2018-04-22 14:45:12 +02:00
wusbcore USB: wusbcore: crypto: Remove VLA usage 2018-03-16 15:40:19 +01:00
Kconfig usb: select USB_COMMON for usb role switch config 2018-04-22 15:23:37 +02:00
Makefile usb: roles: Add Intel xHCI USB role switch driver 2018-03-22 13:49:27 +01:00
README
usb-skeleton.c usb: usb-skeleton: make MODULE_LICENSE and SPDX tag match 2018-03-06 09:42:07 -08:00

To understand all the Linux-USB framework, you'll use these resources:

    * This source code.  This is necessarily an evolving work, and
      includes kerneldoc that should help you get a current overview.
      ("make pdfdocs", and then look at "usb.pdf" for host side and
      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
      more information.

    * The USB 2.0 specification (from www.usb.org), with supplements
      such as those for USB OTG and the various device classes.
      The USB specification has a good overview chapter, and USB
      peripherals conform to the widely known "Chapter 9".

    * Chip specifications for USB controllers.  Examples include
      host controllers (on PCs, servers, and more); peripheral
      controllers (in devices with Linux firmware, like printers or
      cell phones); and hard-wired peripherals like Ethernet adapters.

    * Specifications for other protocols implemented by USB peripheral
      functions.  Some are vendor-specific; others are vendor-neutral
      but just standardized outside of the www.usb.org team.

Here is a list of what each subdirectory here is, and what is contained in
them.

core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("hub_wq").

host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  be used with more specialized "embedded" systems.

gadget/		- This is for USB peripheral controller drivers and
		  the various gadget drivers which talk to them.


Individual USB driver directories.  A new driver should be added to the
first subdirectory in the list below that it fits into.

image/		- This is for still image drivers, like scanners or
		  digital cameras.
../input/	- This is for any driver that uses the input subsystem,
		  like keyboard, mice, touchscreens, tablets, etc.
../media/	- This is for multimedia drivers, like video cameras,
		  radios, and any other drivers that talk to the v4l
		  subsystem.
../net/		- This is for network drivers.
serial/		- This is for USB to serial drivers.
storage/	- This is for USB mass-storage drivers.
class/		- This is for all USB device drivers that do not fit
		  into any of the above categories, and work for a range
		  of USB Class specified devices. 
misc/		- This is for all USB device drivers that do not fit
		  into any of the above categories.