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]
Date:   Thu, 23 Apr 2020 13:06:21 +0000
From:   Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To:     Fabrice Gasnier <fabrice.gasnier@...com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "balbi@...nel.org" <balbi@...nel.org>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "amelie.delaunay@...com" <amelie.delaunay@...com>
Subject: Re: [PATCH v2 1/4] usb: dwc2: gadget: move gadget resume after the
 core is in L0 state



On 4/23/2020 3:55 PM, Fabrice Gasnier wrote:
> When the remote wakeup interrupt is triggered, lx_state is resumed from L2
> to L0 state. But when the gadget resume is called, lx_state is still L2.
> This prevents the resume callback to queue any request. Any attempt
> to queue a request from resume callback will result in:
> - "submit request only in active state" debug message to be issued
> - dwc2_hsotg_ep_queue() returns -EAGAIN
> 
> Call the gadget resume routine after the core is in L0 state.
> 
> Fixes: f81f46e1f530 ("usb: dwc2: implement hibernation during bus suspend/resume")
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@...com>
Acked-by: Minas Harutyunyan <hminas@...opsys.com>

> ---
> Changes in v2:
> - Minor update to follow Minas suggestions
> ---
>   drivers/usb/dwc2/core_intr.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
> index 876ff31..55f1d14 100644
> --- a/drivers/usb/dwc2/core_intr.c
> +++ b/drivers/usb/dwc2/core_intr.c
> @@ -416,10 +416,13 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
>   			if (ret && (ret != -ENOTSUPP))
>   				dev_err(hsotg->dev, "exit power_down failed\n");
>   
> +			/* Change to L0 state */
> +			hsotg->lx_state = DWC2_L0;
>   			call_gadget(hsotg, resume);
> +		} else {
> +			/* Change to L0 state */
> +			hsotg->lx_state = DWC2_L0;
>   		}
> -		/* Change to L0 state */
> -		hsotg->lx_state = DWC2_L0;
>   	} else {
>   		if (hsotg->params.power_down)
>   			return;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ