linux/drivers/usb
Nicolas Saenz Julienne 8eb58994dd usb: hub: add retry routine after intr URB submit error
The hub sends hot-plug events to the host trough it's interrupt URB. The
driver takes care of completing the URB and re-submitting it. Completion
errors are handled in the hub_event() work, yet submission errors are
ignored, rendering the device unresponsive. All further events are lost.

It is fairly hard to find this issue in the wild, since you have to time
the USB hot-plug event with the URB submission failure. For instance it
could be the system running out of memory or some malfunction in the USB
controller driver. Nevertheless, it's pretty reasonable to think it'll
happen sometime. One can trigger this issue using eBPF's function
override feature (see BCC's inject.py script).

This patch adds a retry routine to the event of a submission error. The
HUB driver will try to re-submit the URB once every second until it's
successful or the HUB is disconnected.

As some USB subsystems already take care of this issue, the
implementation was inspired from usbhid/hid_core.c's.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Oliver Neukum <oneukum@suse.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18 09:58:04 +01:00
..
atm
c67x00
chipidea usb: chipidea: imx: allow to configure oc polarity on i.MX25 2018-12-11 09:13:11 +08:00
class usb: cdc-acm: send ZLP for Telit 3G Intel based modems 2019-01-07 17:23:29 +01:00
common usb: roles: Add a description for the class to Kconfig 2018-12-17 14:07:59 +01:00
core usb: hub: add retry routine after intr URB submit error 2019-01-18 09:58:04 +01:00
dwc2 usb: dwc2: Fix disable all EP's on disconnect 2018-12-11 15:42:39 +02:00
dwc3 pci-v4.21-changes 2019-01-05 17:57:34 -08:00
early
gadget Merge 5.0-rc2 into usb-next 2019-01-15 15:37:46 +01:00
host Merge 5.0-rc2 into usb-next 2019-01-15 15:37:46 +01:00
image scsi: flip the default on use_clustering 2018-12-18 23:13:12 -05:00
isp1760
misc Merge 4.20-rc6 into usb-next 2018-12-10 10:19:08 +01:00
mon
mtu3 usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler 2018-12-07 07:58:28 +02:00
musb usb: musb: dsps: fix runtime pm for peripheral mode 2018-12-18 15:46:31 +01:00
phy
renesas_usbhs usb: renesas_usbhs: add support for RZ/G2E 2018-12-17 14:07:59 +01:00
roles usb: roles: Add a description for the class to Kconfig 2018-12-17 14:07:59 +01:00
serial USB: serial: option: add Fibocom NL678 series 2018-12-21 16:47:02 +01:00
storage USB: storage: add quirk for SMI SM3350 2019-01-07 17:23:30 +01:00
typec USB/PHY patches for 4.21-rc1 2018-12-28 20:30:00 -08:00
usbip
wusbcore
Kconfig usb: roles: Add a description for the class to Kconfig 2018-12-17 14:07:59 +01:00
Makefile
README
usb-skeleton.c

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.