On Tue, May 12, 2015 at 08:37:40PM +0200, Mian Yousaf Kaukab wrote: > If ep->dma is set, abort_dma() takes care of dma clean-up. If ep->dma > is not set, unconditionally reset dma channel. > > Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx> > --- > drivers/usb/gadget/udc/net2280.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c > index a91da36..891ab2f 100644 > --- a/drivers/usb/gadget/udc/net2280.c > +++ b/drivers/usb/gadget/udc/net2280.c > @@ -1979,9 +1979,15 @@ static void usb_reset_338x(struct net2280 *dev) > /* clear old dma and irq state */ > for (tmp = 0; tmp < 4; tmp++) { > struct net2280_ep *ep = &dev->ep[tmp + 1]; > + struct net2280_dma_regs *dma; > > - if (ep->dma) > + if (ep->dma) { > abort_dma(ep); > + } else { > + dma = &dev->dma[tmp]; > + writel(BIT(DMA_ABORT), &dma->dmastat); > + writel(0, &dma->dmactl); adds new sparse warnings: drivers/usb/gadget/udc/net2280.c:1987:29: warning: incorrect type in assignment (different address spaces) drivers/usb/gadget/udc/net2280.c:1987:29: expected struct net2280_dma_regs *dma drivers/usb/gadget/udc/net2280.c:1987:29: got struct net2280_dma_regs [noderef] <asn:2>* drivers/usb/gadget/udc/net2280.c:1988:25: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/udc/net2280.c:1988:25: expected void volatile [noderef] <asn:2>*addr drivers/usb/gadget/udc/net2280.c:1988:25: got unsigned int *<noident> drivers/usb/gadget/udc/net2280.c:1989:25: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/udc/net2280.c:1989:25: expected void volatile [noderef] <asn:2>*addr drivers/usb/gadget/udc/net2280.c:1989:25: got unsigned int *<noident> -- balbi
Attachment:
signature.asc
Description: Digital signature