Hi,
On Thu, Nov 19, 2009 at 06:58:06PM +0100, ext Sergei Shtylyov wrote:
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c11d31f..90655df 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1556,7 +1556,7 @@ irqreturn_t musb_interrupt(struct musb *musb)
musb_host_rx(musb, ep_num);
} else {
if (is_peripheral_capable())
- musb_g_rx(musb, ep_num);
+ musb_g_rx(musb, ep_num, false);
}
}
@@ -1627,14 +1627,11 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit)
musb_host_rx(musb, epnum);
} else {
if (is_peripheral_capable())
- musb_g_rx(musb, epnum);
+ musb_g_rx(musb, epnum, true);
Actually, I think it would have been cleaner to have separate versions
of musb_g_[rt]x() for the DMA and non-DMA interrupt. The same can be said of
the host side...
we would have a bit of code duplication, no ??
+ epnum, csr, musb_readw(epio, MUSB_RXCSR),
+ len, request);
+
+ if (!is_dma) {
+ /* Unload with pio */
+ do_pio_rx(musb, req);
+ } else {
+ BUG_ON(request->actual != request->length);
Won't it almost always be the case since we've just aborted? Why bug then?
no... if this was caused by a dma irq, request->actuall should be
exactly the same as request->length. We only get dma irq on rx when we
program dma for e.g. 64k and we receive exactly 64k. If we get a short
in the middle, we won't see a dma irq.
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html