linux/drivers/usb
Andrzej Pietrasiewicz 2595c59def usb: gadget: printer: enqueue printer's response for setup request
commit eb132ccbde upstream.

Function-specific setup requests should be handled in such a way, that
apart from filling in the data buffer, the requests are also actually
enqueued: if function-specific setup is called from composte_setup(),
the "usb_ep_queue()" block of code in composite_setup() is skipped.

The printer function lacks this part and it results in e.g. get device id
requests failing: the host expects some response, the device prepares it
but does not equeue it for sending to the host, so the host finally asserts
timeout.

This patch adds enqueueing the prepared responses.

Fixes: 2e87edf492: "usb: gadget: make g_printer use composite"
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[ported to stable 3.10 and 3.14]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-13 05:16:59 -07:00
..
atm
c67x00
chipidea usb: chipidea: msm: Initialize PHY on reset event 2014-10-05 14:52:14 -07:00
class cdc-wdm: fix endianness bug in debug statements 2015-05-06 21:59:09 +02:00
core usb: core: hub: use new USB_RESUME_TIMEOUT 2015-05-06 21:59:13 +02:00
dwc2 usb: dwc2: hcd: use new USB_RESUME_TIMEOUT 2015-05-06 21:59:13 +02:00
dwc3 usb: dwc3: dwc3-omap: Fix disable IRQ 2015-03-18 13:31:29 +01:00
early
gadget usb: gadget: printer: enqueue printer's response for setup request 2015-05-13 05:16:59 -07:00
host usb: host: ehci: use new USB_RESUME_TIMEOUT 2015-05-13 05:16:59 -07:00
image
misc USB: sisusb: add device id for Magic Control USB video 2014-10-05 14:52:13 -07:00
mon
musb usb: musb: use new USB_RESUME_TIMEOUT 2015-05-13 05:16:58 -07:00
phy usb: phy: Find the right match in devm_usb_phy_match 2015-05-06 21:59:11 +02:00
renesas_usbhs
serial USB: ftdi_sio: Use jtag quirk for SNAP Connect E10 2015-04-19 10:11:07 +02:00
storage usb-storage: handle a skipped data phase 2014-11-14 09:00:07 -08:00
wusbcore
Kconfig USB patches for 3.14-rc1 2014-01-20 16:13:02 -08:00
Makefile Move DWC2 driver out of staging 2014-01-13 14:44:01 -08:00
README
usb-common.c
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 ("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.