Linux USB
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Dinh Nguyen <dinguyen@kernel.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating
Date: Tue, 4 Jan 2022 07:31:19 +0000	[thread overview]
Message-ID: <7aaa0e93-9c6f-d4e5-1ceb-68a08081a8cf@synopsys.com> (raw)
In-Reply-To: <20220104022238.725195-1-dinguyen@kernel.org>

On 1/4/2022 6:22 AM, Dinh Nguyen wrote:
> We should not be clearing the HCD_FLAG_HW_ACCESSIBLE bit if the hardware
> does not support clock gating.
> 
> Fixes: 50fb0c128b6e ("usb: dwc2: Add clock gating entering flow by
> system suspend")
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>


Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>

> ---
>   drivers/usb/dwc2/hcd.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 13c779a28e94..f63a27d11fac 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -4399,11 +4399,12 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
>   		 * If not hibernation nor partial power down are supported,
>   		 * clock gating is used to save power.
>   		 */
> -		if (!hsotg->params.no_clock_gating)
> +		if (!hsotg->params.no_clock_gating) {
>   			dwc2_host_enter_clock_gating(hsotg);
>   
> -		/* After entering suspend, hardware is not accessible */
> -		clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
> +			/* After entering suspend, hardware is not accessible */
> +			clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
> +		}
>   		break;
>   	default:
>   		goto skip_power_saving;


  reply	other threads:[~2022-01-04  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04  2:22 [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating Dinh Nguyen
2022-01-04  7:31 ` Minas Harutyunyan [this message]
2022-01-04  9:39 ` Sergey Shtylyov
2022-01-04 13:56   ` Dinh Nguyen

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=7aaa0e93-9c6f-d4e5-1ceb-68a08081a8cf@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=dinguyen@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /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