linux-imx/drivers/usb
Alan Stern 0ebead18aa USB: OHCI: Fix race between ED unlink and URB submission
commit 7d8021c967 upstream.

This patch fixes a bug introduced by commit 977dcfdc60 ("USB: OHCI:
don't lose track of EDs when a controller dies").  The commit changed
ed_state from ED_UNLINK to ED_IDLE too early, before finish_urb() had
been called.  The user-visible consequence is that the driver
occasionally crashes or locks up when an URB is submitted while
another URB for the same endpoint is being unlinked.

This patch moves the ED state change later, to the right place.  The
drawback is that now we may unnecessarily execute some instructions
multiple times when a controller dies.  Since controllers dying is an
exceptional occurrence, a little wasted time won't matter.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Heiko Przybyl <lil_tux@web.de>
Tested-by: Heiko Przybyl <lil_tux@web.de>
Fixes: 977dcfdc60
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-06-01 00:30:16 +01:00
..
atm USB: cxacru: potential underflow in cxacru_cm_get_array() 2013-05-30 14:35:04 +01:00
c67x00 usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
class CDC-ACM: apply quirk for card reader 2018-06-01 00:30:09 +01:00
core usb: Add device quirk for Logitech HD Pro Webcam C925e 2018-03-03 15:50:51 +00:00
dwc3 usb: dwc3: gadget: Set maxpacket size for ep0 IN 2018-06-01 00:30:14 +01:00
early USB: echi-dbgp: increase the controller wait time to come out of halt. 2012-08-10 00:25:07 +01:00
gadget USB: dummy-hcd: Fix deadlock caused by disconnect detection 2018-01-01 20:50:56 +00:00
host USB: OHCI: Fix race between ED unlink and URB submission 2018-06-01 00:30:16 +01:00
image atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
misc usb: usbtest: fix NULL pointer dereference 2017-11-11 13:34:40 +00:00
mon USB: fix usbmon BUG trigger 2018-03-03 15:50:57 +00:00
musb usb: musb: tusb6010_omap: Do not reset the other direction's packet size 2017-09-15 18:30:45 +01:00
otg usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
renesas_usbhs usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro 2018-03-19 18:58:23 +00:00
serial USB: serial: pl2303: new device id for Chilitag 2018-06-01 00:30:10 +01:00
storage USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID 2018-03-03 15:50:45 +00:00
wusbcore USB: wusbcore: fix NULL-deref at probe 2017-07-18 18:38:32 +01:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
Makefile usb: Provide usb_speed_string() function 2011-09-18 01:29:04 -07:00
README
usb-common.c usb: Provide usb_speed_string() function 2011-09-18 01:29:04 -07:00
usb-skeleton.c USB: use usb_endpoint_maxp() instead of le16_to_cpu() 2011-08-23 09:47:40 -07: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 ("khubd").

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.