public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Baldyga <r.baldyga@samsung.com>,
	balbi@ti.com, johnyoun@synopsys.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	b.zolnierkie@samsung.com
Subject: Re: [PATCH 5/5] usb: dwc2: gadget: free TX FIFO after killing requests
Date: Tue, 29 Dec 2015 19:01:27 +0300	[thread overview]
Message-ID: <5682AE57.5000505@cogentembedded.com> (raw)
In-Reply-To: <1451319928-21250-6-git-send-email-r.baldyga@samsung.com>

Hello.

On 12/28/2015 07:25 PM, Robert Baldyga wrote:

> As kill_all_requests() potentially flushes TX FIFO, we should should
> free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
>
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
>   drivers/usb/dwc2/gadget.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index fadd635..e14d076 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -2779,10 +2779,6 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
>
>   	spin_lock_irqsave(&hsotg->lock, flags);
>
> -	hsotg->fifo_map &= ~(1<<hs_ep->fifo_index);
> -	hs_ep->fifo_index = 0;
> -	hs_ep->fifo_size = 0;
> -
>   	ctrl = dwc2_readl(hsotg->regs + epctrl_reg);
>   	ctrl &= ~DXEPCTL_EPENA;
>   	ctrl &= ~DXEPCTL_USBACTEP;
> @@ -2797,6 +2793,10 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
>   	/* terminate all requests with shutdown */
>   	kill_all_requests(hsotg, hs_ep, -ESHUTDOWN);
>
> +	hsotg->fifo_map &= ~(1<<hs_ep->fifo_index);

    Please enclose << in spaces for consistency with the other code, and with 
the kernel coding style in general.

[...]

MBR, Sergei


      reply	other threads:[~2015-12-29 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 16:25 [PATCH 0/5] usb: dwc2: gadget: Fix TX FIFO handling Robert Baldyga
2015-12-28 16:25 ` [PATCH 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers Robert Baldyga
2015-12-28 16:25 ` [PATCH 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization Robert Baldyga
2015-12-28 16:25 ` [PATCH 3/5] usb: dwc2: gadget: change variable name to more meaningful Robert Baldyga
2015-12-28 16:25 ` [PATCH 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable() Robert Baldyga
2015-12-28 16:25 ` [PATCH 5/5] usb: dwc2: gadget: free TX FIFO after killing requests Robert Baldyga
2015-12-29 16:01   ` Sergei Shtylyov [this message]

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=5682AE57.5000505@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnyoun@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=r.baldyga@samsung.com \
    /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