linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA
Date: Thu, 18 Dec 2014 18:20:39 +0100	[thread overview]
Message-ID: <54930CE7.50008@atmel.com> (raw)
In-Reply-To: <1418807929-31952-1-git-send-email-voice.shen@atmel.com>

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 at 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
> 


-- 
Nicolas Ferre

  parent reply	other threads:[~2014-12-18 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17  9:18 [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Bo Shen
2014-12-17  9:18 ` [PATCH 2/2] USB: gadget: udc: atmel: fix possible IN hang issue Bo Shen
2014-12-18 17:22   ` Nicolas Ferre
2014-12-18 17:20 ` Nicolas Ferre [this message]
2014-12-22 16:38   ` [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54930CE7.50008@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).