public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell•net>
To: Anton Vorontsov <avorontsov@ru•mvista.com>
Cc: Greg Kroah-Hartman <greg@kroah•com>,
	Li Yang <leoli@freescale•com>,
	linux-usb@vger•kernel.org, linuxppc-dev@ozlabs•org
Subject: Re: [PATCH 5/6] usb/fsl_qe_udc: Fix muram corruption by disabled endpoints
Date: Mon, 17 Nov 2008 17:52:21 -0800	[thread overview]
Message-ID: <200811171752.22105.david-b@pacbell.net> (raw)
In-Reply-To: <20081111160340.GE24699@oksana.dev.rtsoft.ru>

On Tuesday 11 November 2008, Anton Vorontsov wrote:
> Before freeing an endpoint's muram memory, we should stop all activity
> of the endpoint, otherwise the QE UDC controller might do nasty things
> with the muram memory that isn't belong to that endpoint anymore.
> 
> The qe_ep_reset() effectively flushes the hardware fifos, finishes all
> late transaction and thus prevents the corruption.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru•mvista.com>

Acked-by: David Brownell <dbrownell@users•sourceforge.net>


> ---
>  drivers/usb/gadget/fsl_qe_udc.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
> index 7bb5f36..cb47337 100644
> --- a/drivers/usb/gadget/fsl_qe_udc.c
> +++ b/drivers/usb/gadget/fsl_qe_udc.c
> @@ -1622,6 +1622,7 @@ static int qe_ep_disable(struct usb_ep *_ep)
>  	nuke(ep, -ESHUTDOWN);
>  	ep->desc = NULL;
>  	ep->stopped = 1;
> +	qe_ep_reset(udc, ep->epnum);
>  	spin_unlock_irqrestore(&udc->lock, flags);
>  
>  	cpm_muram_free(cpm_muram_offset(ep->rxbase));
> -- 
> 1.5.6.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

  reply	other threads:[~2008-11-18  2:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11 16:01 [PATCH 0/6] More QE UDC fixes Anton Vorontsov
2008-11-11 16:03 ` [PATCH 1/6] usb/fsl_qe_udc: Fix oops on QE UDC probe failure Anton Vorontsov
2008-11-18  1:55   ` David Brownell
2008-11-11 16:03 ` [PATCH 2/6] usb/fsl_qe_udc: Fix recursive locking bug in ch9getstatus() Anton Vorontsov
2008-11-18  1:59   ` David Brownell
2008-11-18 17:51     ` [PATCH 2/6 v2] " Anton Vorontsov
2008-11-18 22:13       ` David Brownell
2008-11-19  0:20         ` [PATCH 2/6 v3] " Anton Vorontsov
2008-11-20  5:41           ` David Brownell
2008-11-11 16:03 ` [PATCH 3/6] usb/fsl_qe_udc: Fix QE USB controller initialization Anton Vorontsov
2008-11-11 16:03 ` [PATCH 4/6] usb/fsl_qe_udc: Fix disconnects reporting during bus reset Anton Vorontsov
2008-11-18  1:48   ` David Brownell
2008-11-11 16:03 ` [PATCH 5/6] usb/fsl_qe_udc: Fix muram corruption by disabled endpoints Anton Vorontsov
2008-11-18  1:52   ` David Brownell [this message]
2008-11-11 16:03 ` [PATCH 6/6] usb/fsl_qe_udc: Fix stalled TX requests bug Anton Vorontsov
2008-11-18  1:53   ` David Brownell

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=200811171752.22105.david-b@pacbell.net \
    --to=david-b@pacbell$(echo .)net \
    --cc=avorontsov@ru$(echo .)mvista.com \
    --cc=dbrownell@users$(echo .)sourceforge.net \
    --cc=greg@kroah$(echo .)com \
    --cc=leoli@freescale$(echo .)com \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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