linux-stable/drivers/usb
Yoshihiro Shimoda 15e4292a2d usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable()
This patch fixes an issue that the CFIFOSEL register value is possible
to be changed by usbhsg_ep_enable() wrongly. And then, a data transfer
using CFIFO may not work correctly.

For example:
 # modprobe g_multi file=usb-storage.bin
 # ifconfig usb0 192.168.1.1 up
 (During the USB host is sending file to the mass storage)
 # ifconfig usb0 down

In this case, since the u_ether.c may call usb_ep_enable() in
eth_stop(), if the renesas_usbhs driver is also using CFIFO for
mass storage, the mass storage may not work correctly.

So, this patch adds usbhs_lock() and usbhs_unlock() calling in
usbhsg_ep_enable() to protect CFIFOSEL register. This is because:
 - CFIFOSEL.CURPIPE = 0 is also needed for the pipe configuration
 - The CFIFOSEL (fifo->sel) is already protected by usbhs_lock()

Fixes: 97664a207b ("usb: renesas_usbhs: shrink spin lock area")
Cc: <stable@vger.kernel.org> # v3.1+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-29 11:14:44 +03:00
..
atm Use "foo *bar" instead of "foo * bar". 2016-04-28 12:57:49 -07:00
c67x00
chipidea usb: chipidea: imx: delete the redundant setting default DMA mask code 2016-04-06 17:14:38 +08:00
class tty: Replace ASYNC_INITIALIZED bit and update atomically 2016-04-30 09:26:55 -07:00
common USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block 2016-06-21 10:52:39 +03:00
core usb: quirks: Add no-lpm quirk for Acer C120 LED Projector 2016-06-01 14:56:24 -07:00
dwc2 USB: dwc2-usb: add USB_GADGET dependency 2016-06-29 11:11:41 +03:00
dwc3 dwc3: gadget: Implement the suspend entry event handler 2016-06-21 11:16:01 +03:00
early
gadget usb: gadget: f_fs: check for allocation failure 2016-06-29 11:13:33 +03:00
host usb: gadget: move gadget API functions to udc-core 2016-06-21 10:38:34 +03:00
image
isp1760 usb: Remove unnecessary space before open square bracket. 2016-05-09 13:08:46 +02:00
misc USB patches for 4.7-rc1 2016-05-20 21:12:25 -07:00
mon usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock 2016-02-06 21:55:57 -08:00
musb usb: musb: sunxi: Remove bogus "Frees glue" comment 2016-06-14 13:36:23 -07:00
phy usb: phy: move msm_hsusb.h into driver 2016-06-21 11:12:10 +03:00
renesas_usbhs usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable() 2016-06-29 11:14:44 +03:00
serial USB: mos7720: delete parport 2016-06-07 22:15:25 -07:00
storage USB: uas: Fix slave queue_depth not being set 2016-06-01 14:56:24 -07:00
usbip usbip: rate limit get_frame_number message 2016-06-17 18:00:46 -07:00
wusbcore usb: wusbcore: Do not initialise statics to 0. 2016-05-09 13:08:46 +02:00
Kconfig usb: common: rework CONFIG_USB_COMMON logic 2016-04-18 15:23:36 +03:00
Makefile usb: fsl: drop USB_FSL_MPH_DR_OF Kconfig symbol 2016-03-04 15:14:29 +02:00
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.