linux-stable-rt/drivers/usb/gadget
Robert Jarzmik 367815eea4 USB: pxa27x_udc: single-thread setup requests
Since the PXA 27x UDC automatically ACK's some control
packets such as SET_INTERFACE, the gadgets may not get a
chance to process the request before another control packet
is received. The Linux gadgets do not expect to receive
setup callbacks out of order. The file storage gadget only
saves the "highest" priority request.

The PXA27x UDC driver must make sure it only sends one up at
a time, allowing the gadget to make changes before
continuing. In theory, the host would be NACK'd while the
gadget processes the change but the UDC has already ACK'd
the request. If another request is sent by the host that is
not automatically ACK'd by the UDC, then the throttling
happens properly to regain sync.

The observed case was the file_storage gadget timing out on
a BulkReset request because the SET_INTERFACE was being
processed by the gadget. Since SET_INTERFACE is higher
priority than BulkReset, the BulkReset was dropped.  This
was exacerbated by turning on the debug which delayed the
fsg signal processing thread.

This also fixes the "should never get in
WAIT_ACK_SET_CONF_INTERF state here!!!" warning.

Reported-by: Vernon Sauder <vernoninhand@gmail.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

index 51790b0..1937d8c 100644
2009-06-15 21:44:42 -07:00
..
Kconfig USB: pxa27x_udc: compatibility with pxa320 SoC 2009-06-15 21:44:42 -07:00
Makefile
amd5536udc.c
amd5536udc.h
at91_udc.c USB: at91_udc: use helper functions to determine endpoint type and direction 2009-06-15 21:44:42 -07:00
at91_udc.h
atmel_usba_udc.c USB: atmel_usba_udc: use helper functions to determine endpoint type and direction 2009-06-15 21:44:41 -07:00
atmel_usba_udc.h
cdc2.c
ci13xxx_udc.c
ci13xxx_udc.h
composite.c
config.c
dummy_hcd.c
epautoconf.c
ether.c
f_acm.c
f_ecm.c
f_loopback.c
f_obex.c
f_phonet.c
f_rndis.c
f_serial.c
f_sourcesink.c
f_subset.c
file_storage.c
fsl_qe_udc.c
fsl_qe_udc.h
fsl_usb2_udc.c
fsl_usb2_udc.h
g_zero.h
gadget_chips.h
gmidi.c
goku_udc.c USB: Goku-S: use helper functions to determine endpoint type and direction 2009-06-15 21:44:42 -07:00
goku_udc.h
imx_udc.c
imx_udc.h
inode.c USB: gadgetfs: use helper functions to determine endpoint type and direction 2009-06-15 21:44:42 -07:00
lh7a40x_udc.c
lh7a40x_udc.h
m66592-udc.c
m66592-udc.h
ndis.h
net2280.c
net2280.h
omap_udc.c
omap_udc.h
printer.c
pxa25x_udc.c
pxa25x_udc.h
pxa27x_udc.c USB: pxa27x_udc: single-thread setup requests 2009-06-15 21:44:42 -07:00
pxa27x_udc.h USB: pxa27x_udc: single-thread setup requests 2009-06-15 21:44:42 -07:00
rndis.c
rndis.h
s3c2410_udc.c
s3c2410_udc.h
serial.c
u_ether.c
u_ether.h
u_phonet.h
u_serial.c
u_serial.h
usbstring.c
zero.c