|
@@ -2374,12 +2374,11 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)
|
|
|
int is_in = usb_pipein(urb->pipe);
|
|
|
int status = 0;
|
|
|
u16 csr;
|
|
|
+ struct dma_channel *dma = NULL;
|
|
|
|
|
|
musb_ep_select(regs, hw_end);
|
|
|
|
|
|
if (is_dma_capable()) {
|
|
|
- struct dma_channel *dma;
|
|
|
-
|
|
|
dma = is_in ? ep->rx_channel : ep->tx_channel;
|
|
|
if (dma) {
|
|
|
status = ep->musb->dma_controller->channel_abort(dma);
|
|
@@ -2395,10 +2394,9 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)
|
|
|
/* giveback saves bulk toggle */
|
|
|
csr = musb_h_flush_rxfifo(ep, 0);
|
|
|
|
|
|
- /* REVISIT we still get an irq; should likely clear the
|
|
|
- * endpoint's irq status here to avoid bogus irqs.
|
|
|
- * clearing that status is platform-specific...
|
|
|
- */
|
|
|
+ /* clear the endpoint's irq status here to avoid bogus irqs */
|
|
|
+ if (is_dma_capable() && dma)
|
|
|
+ musb_platform_clear_ep_rxintr(musb, ep->epnum);
|
|
|
} else if (ep->epnum) {
|
|
|
musb_h_tx_flush_fifo(ep);
|
|
|
csr = musb_readw(epio, MUSB_TXCSR);
|