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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <566f2d65-1b5a-ed2a-f33f-516b66be2624@synopsys.com>
Date:   Wed, 15 Jul 2020 12:23:02 +0000
From:   Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To:     Lee Jones <lee.jones@...aro.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        Ben Dooks <ben@...tec.co.uk>
Subject: Re: [PATCH v2 1/8] usb: dwc2: gadget: Make use of GINTMSK2



On 7/15/2020 1:32 PM, Lee Jones wrote:
> The value obtained from GINTSTS2 should be masked with the GINTMSK2
> value.  Looks like this has been broken since
> dwc2_gadget_wkup_alert_handler() was added back in 2018.
> 
> Also fixes the following W=1 warning:
> 
>   drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’:
>   drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable]
>   259 | u32 gintmsk2;
>   | ^~~~~~~~
> 
> Cc: Minas Harutyunyan <hminas@...opsys.com>
> Cc: Ben Dooks <ben@...tec.co.uk>
> Fixes: 187c5298a1229 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt")
> Signed-off-by: Lee Jones <lee.jones@...aro.org>

Acked-by: Minas Harutyunyan <hminas@...opsys.com>

> ---
> Changelog:
> 
> v2: Re-written to *use* instad of *remove* gintmsk2
> 
>   drivers/usb/dwc2/gadget.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index df5fedaca60a0..03cf1fa856219 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -260,6 +260,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)
>   
>   	gintsts2 = dwc2_readl(hsotg, GINTSTS2);
>   	gintmsk2 = dwc2_readl(hsotg, GINTMSK2);
> +	gintsts2 &= gintmsk2;
>   
>   	if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
>   		dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ