lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5682AE57.5000505@cogentembedded.com>
Date:	Tue, 29 Dec 2015 19:01:27 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Robert Baldyga <r.baldyga@...sung.com>, balbi@...com,
	johnyoun@...opsys.com
Cc:	gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, m.szyprowski@...sung.com,
	b.zolnierkie@...sung.com
Subject: Re: [PATCH 5/5] usb: dwc2: gadget: free TX FIFO after killing
 requests

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@...sung.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ