Message ID | 1418807929-31952-1-git-send-email-voice.shen@atmel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Le 17/12/2014 10:18, Bo Shen a écrit : > According to the datasheet, when transfer using DMA, the control > setting for IN packet only need END_BUF_EN, END_BUF_IE, CH_EN, > while for OUT packet, need more two bits END_TR_EN and END_TR_IE > to be configured. > > Signed-off-by: Bo Shen <voice.shen@atmel.com> Seems okay, even if I am not used to these aspects: Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> I would also add a "stable" tag to these patches, something like this: Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver) Cc: stable@vger.kernel.org # always been there... Felipe, Can you take both of these patches as fixes? > --- > > drivers/usb/gadget/udc/atmel_usba_udc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c > index ce88237..63e90f5 100644 > --- a/drivers/usb/gadget/udc/atmel_usba_udc.c > +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c > @@ -716,10 +716,10 @@ static int queue_dma(struct usba_udc *udc, struct usba_ep *ep, > req->using_dma = 1; > req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length) > | USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE > - | USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; > + | USBA_DMA_END_BUF_EN; > > - if (ep->is_in) > - req->ctrl |= USBA_DMA_END_BUF_EN; > + if (!ep->is_in) > + req->ctrl |= USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; > > /* > * Add this request to the queue and submit for DMA if >
On Thu, Dec 18, 2014 at 06:20:39PM +0100, Nicolas Ferre wrote: > Le 17/12/2014 10:18, Bo Shen a écrit : > > According to the datasheet, when transfer using DMA, the control > > setting for IN packet only need END_BUF_EN, END_BUF_IE, CH_EN, > > while for OUT packet, need more two bits END_TR_EN and END_TR_IE > > to be configured. > > > > Signed-off-by: Bo Shen <voice.shen@atmel.com> > > Seems okay, even if I am not used to these aspects: > Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> > > I would also add a "stable" tag to these patches, something like this: > > Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver) > Cc: stable@vger.kernel.org # always been there... > > > Felipe, > > Can you take both of these patches as fixes? I'll get back to them... Still other patches to go through.
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index ce88237..63e90f5 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -716,10 +716,10 @@ static int queue_dma(struct usba_udc *udc, struct usba_ep *ep, req->using_dma = 1; req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length) | USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE - | USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; + | USBA_DMA_END_BUF_EN; - if (ep->is_in) - req->ctrl |= USBA_DMA_END_BUF_EN; + if (!ep->is_in) + req->ctrl |= USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; /* * Add this request to the queue and submit for DMA if
According to the datasheet, when transfer using DMA, the control setting for IN packet only need END_BUF_EN, END_BUF_IE, CH_EN, while for OUT packet, need more two bits END_TR_EN and END_TR_IE to be configured. Signed-off-by: Bo Shen <voice.shen@atmel.com> --- drivers/usb/gadget/udc/atmel_usba_udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)