USB: musb: fix musb_host_tx() for shared endpoint FIFO
authorDmitry Krivoschekov <[email protected]>
Sat, 21 Feb 2009 23:30:15 +0000 (15:30 -0800)
committerGreg Kroah-Hartman <[email protected]>
Fri, 27 Feb 2009 22:40:51 +0000 (14:40 -0800)
The input queue should be used for TX on endpoints which
share FIFO hardware.  The host TX path wasn't doing that.

Shared FIFOs are most often configured for periodic endpoints,
which are mostly used for RX/IN transfers ... that's probably
how this bug managed to linger for a long time.

[email protected]: update patch description ]

Signed-off-by: Dmitry Krivoschekov <[email protected]>
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: David Brownell <[email protected]>
Cc: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/musb/musb_host.c

index a035ceccf95019c09082139be0727bf395a7a311..b47ca948bcf41a8a4b5710aecb54be41350d64bd 100644 (file)
@@ -1161,7 +1161,8 @@ void musb_host_tx(struct musb *musb, u8 epnum)
        struct urb              *urb;
        struct musb_hw_ep       *hw_ep = musb->endpoints + epnum;
        void __iomem            *epio = hw_ep->regs;
-       struct musb_qh          *qh = hw_ep->out_qh;
+       struct musb_qh          *qh = hw_ep->is_shared_fifo ? hw_ep->in_qh
+                                                           : hw_ep->out_qh;
        u32                     status = 0;
        void __iomem            *mbase = musb->mregs;
        struct dma_channel      *dma;