RE: [PATCH] MUSB: Fix aborted RX-DMA path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
> > -----Original Message-----
> > From: Gadiyar, Anand
> > Sent: Wednesday, October 28, 2009 9:16 PM
> > To: linux-usb@xxxxxxxxxxxxxxx
> > Cc: Gadiyar, Anand; Felipe Balbi; David Brownell; Gupta, Ajay Kumar
> > Subject: [PATCH] MUSB: Fix aborted RX-DMA path
> >
> > MUSB: Fix aborted RX-DMA path
> >
> > In the MUSB rxstate function, if channel_program() returns an
> > error, then we use PIO mode to carry out that RX transfer.
> >
> > For this to work correctly, we need to de-assert DMAENAB in
> > RXCSR.
> >
> > Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx>
> > Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx>
> > Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
> > Cc: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
> 
> Ping?
> 
> Ajay, Felipe, David, Greg?

This patch is required and I have tested it personally.

David has to ack then only Greg would accept it but unfortunately
David is disappeared some where and I think almost 10 musb patches
are floating around.

Greg,
	Any other option for musb patches ?

-Ajay

> 
> 
> > ---
> > (Resending with updated $SUBJECT. Sorry for the noise)
> >
> > In current code, this bug is purely academic, since channel_program()
> >  always returns success. However, if it ever failed, then the
> > fix is needed. We spent some time to debug this when we deliberately
> > made channel_program fail (to test the PIO path), so I think this
> > fix is worth having.
> >
> > It's probably not required for the stable trees.
> >
> > diff --git a/drivers/usb/musb/musb_gadget.c
> b/drivers/usb/musb/musb_gadget.c
> > index 8b3c4e2..cfac24d 100644
> > --- a/drivers/usb/musb/musb_gadget.c
> > +++ b/drivers/usb/musb/musb_gadget.c
> > @@ -688,8 +688,15 @@ static void rxstate(struct musb *musb, struct
> musb_request *req)
> >  							transfer_size);
> >  				}
> >
> > -				if (use_dma)
> > +				if (use_dma) {
> >  					return;
> > +				} else {
> > +					/* Need to clear DMAENAB for the
> > +					 * backup PIO mode transfer to work
> > +					 */
> > +					csr &= ~MUSB_RXCSR_DMAENAB;
> > +					musb_writew(epio, MUSB_RXCSR, csr);
> > +				}
> >  			}
> >  #endif	/* Mentor's DMA */
> >
> >
--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux