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 2/2] USB: gadget: udc: atmel: fix possible IN hang issue
Date: Thu, 18 Dec 2014 18:22:10 +0100	[thread overview]
Message-ID: <54930D42.2010306@atmel.com> (raw)
In-Reply-To: <1418807929-31952-2-git-send-email-voice.shen@atmel.com>

Le 17/12/2014 10:18, Bo Shen a ?crit :
> When receive data, the RXRDY in status register set by hardware
> after a new packet has been stored in the endpoint FIFO. When it
> is copied from FIFO, this bit is cleared which make the FIFO can
> be accessed again.
> 
> In the receive_data() function, this bit RXRDY has been cleared.
> So, after the receive_data() function return, this bit should
> not be cleared again, or else it may cause the accessing FIFO
> corrupt, which will make the data loss.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>


Seems okay:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Like the former one:

Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver)
Cc: stable at vger.kernel.org # always been there...

> ---
> 
>  drivers/usb/gadget/udc/atmel_usba_udc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 63e90f5..93328ea 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -1563,7 +1563,6 @@ static void usba_ep_irq(struct usba_udc *udc, struct usba_ep *ep)
>  	if ((epstatus & epctrl) & USBA_RX_BK_RDY) {
>  		DBG(DBG_BUS, "%s: RX data ready\n", ep->ep.name);
>  		receive_data(ep);
> -		usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY);
>  	}
>  }
>  
> 


-- 
Nicolas Ferre

  reply	other threads:[~2014-12-18 17:22 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 [this message]
2014-12-18 17:20 ` [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Nicolas Ferre
2014-12-22 16:38   ` 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=54930D42.2010306@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).