2010/9/24 Felipe Balbi <balbi@xxxxxx>: > From: Hema HK <hemahk@xxxxxx> > > Buffer is mapped to dma when dma channel is allocated. buffer needs > to be unmapped when fallback to PIO mode if dma channel_program > fails. > > Signed-off-by: Hema HK <hemahk@xxxxxx> > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > --- > drivers/usb/musb/musb_gadget.c | 122 +++++++++++++++++++++++++++------------- > 1 files changed, 82 insertions(+), 40 deletions(-) > > diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c > index 36968fc..2aba817 100644 > --- a/drivers/usb/musb/musb_gadget.c > +++ b/drivers/usb/musb/musb_gadget.c > @@ -92,6 +92,60 @@ > @@ -298,7 +336,7 @@ static void txstate(struct musb *musb, struct musb_request *req) > csr); > > #ifndef CONFIG_MUSB_PIO_ONLY > - if (is_dma_capable() && musb_ep->dma) { > + if (is_dma_capable() && !musb_ep->dma && musb->dma_controller) { It is really a bug, any change should not be here, the change does cause performance regression for usbtest #6. Reviewed-by: Ming Lei <tom.leiming@xxxxxxxxx> thanks, -- Lei Ming -- 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