linux/drivers/usb/musb
Sergei Shtylyov cea83241b3 USB: musb_gadget: fix STALL handling
The driver incorrectly cancels the mass-storage device CSW request
(which leads to device reset) due to giving back URB at the head of
endpoint's queue after sending each STALL handshake; stop doing that
and start checking for the queue being non-empty before stalling an
endpoint and disallowing stall in such case in musb_gadget_set_halt()
like the other gadget drivers do.

Moreover, the driver starts Rx request despite of the endpoint being
halted -- fix this by moving the SendStall bit check from musb_g_rx()
to rxstate().  And we also sometimes get into rxstate() with DMA still
active after clearing an endpoint's halt (not clear why), so bail out
in this case, similarly to what txstate() does...

While at it, also do the following changes :

- in musb_gadget_set_halt(), remove pointless Tx FIFO flushing (the
  driver does not allow stalling with non-empty Tx FIFO anyway);

- in rxstate(), stop pointlessly zeroing the 'csr' variable;

- in musb_gadget_set_halt(), move the 'done' label to a more proper
  place;

- in musb_g_rx(), eliminate the 'done' label completely...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:15 -08:00
..
blackfin.c USB: musb: make HAVE_CLK support optional 2009-10-09 13:52:07 -07:00
blackfin.h USB: musb: add Blackfin driver to MUSB framework (v2) 2009-01-07 10:00:07 -08:00
cppi_dma.c musb: split out CPPI interrupt handler 2009-06-15 21:44:40 -07:00
cppi_dma.h headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
davinci.c USB: musb: silence "suspend as a_wait_vrise is_active" msgs 2009-07-12 15:16:37 -07:00
davinci.h USB: musb: partial DaVinci dm355 support 2009-03-24 16:20:36 -07:00
Kconfig USB: musb: invert arch depend string 2009-10-12 14:36:28 -07:00
Makefile USB: musb: add Blackfin Kconfig options and Makefile 2009-01-07 10:00:08 -08:00
musb_core.c USB: musb: fix put_device() call sequence 2009-09-23 06:46:33 -07:00
musb_core.h USB: musb: make HAVE_CLK support optional 2009-10-09 13:52:07 -07:00
musb_debug.h usb: musb: fix debug global variable name 2008-11-13 14:45:01 -08:00
musb_dma.h
musb_gadget.c USB: musb_gadget: fix STALL handling 2009-11-30 16:43:15 -08:00
musb_gadget.h
musb_gadget_ep0.c USB: musb_gadget_ep0: fix typo in service_zero_data_request() 2009-07-28 14:31:11 -07:00
musb_host.c USB: musb_host: undo incorrect change in musb_advance_schedule() 2009-07-12 15:16:40 -07:00
musb_host.h musb: add high bandwidth ISO support 2009-06-15 21:44:41 -07:00
musb_io.h USB: musb: Blackfin provides read/write I/O accessor in header files 2009-01-07 10:00:08 -08:00
musb_regs.h USB: musb: make HAVE_CLK support optional 2009-10-09 13:52:07 -07:00
musb_virthub.c musb: support disconnect after HNP roleswitch 2009-06-15 21:44:41 -07:00
musbhsdma.c USB: musb: sanitize clearing TXCSR DMA bits (take 2) 2009-04-17 10:50:25 -07:00
musbhsdma.h USB: musb: enable low level DMA operation for Blackfin 2009-01-07 10:00:07 -08:00
omap2430.c usb: musb: disable OTG AUTOIDLE only with omap3430 2009-06-15 21:44:46 -07:00
omap2430.h usb: musb: fix include path 2008-09-23 13:58:08 -07:00
tusb6010.c musb: proper hookup to transceiver drivers 2009-06-15 21:44:40 -07:00
tusb6010.h USB: musb: Remove my email address from few musb related drivers 2009-04-23 14:15:27 -07:00
tusb6010_omap.c USB: musb: tusb6010 buildfix 2009-01-27 16:15:33 -08:00