* [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating
@ 2022-01-04 2:22 Dinh Nguyen
2022-01-04 7:31 ` Minas Harutyunyan
2022-01-04 9:39 ` Sergey Shtylyov
0 siblings, 2 replies; 4+ messages in thread
From: Dinh Nguyen @ 2022-01-04 2:22 UTC (permalink / raw)
To: Minas.Harutyunyan; +Cc: dinguyen, Arthur.Petrosyan, gregkh, linux-usb
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>
---
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;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating
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
2022-01-04 9:39 ` Sergey Shtylyov
1 sibling, 0 replies; 4+ messages in thread
From: Minas Harutyunyan @ 2022-01-04 7:31 UTC (permalink / raw)
To: Dinh Nguyen, Minas Harutyunyan; +Cc: Artur Petrosyan, gregkh, linux-usb
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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating
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
@ 2022-01-04 9:39 ` Sergey Shtylyov
2022-01-04 13:56 ` Dinh Nguyen
1 sibling, 1 reply; 4+ messages in thread
From: Sergey Shtylyov @ 2022-01-04 9:39 UTC (permalink / raw)
To: Dinh Nguyen, Minas.Harutyunyan; +Cc: Arthur.Petrosyan, gregkh, linux-usb
Hello!
On 1/4/22 5: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")
Don't break up this line (perhaps could be fixed while applying).
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc2: do not gate off the hardware if it does not support clock gating
2022-01-04 9:39 ` Sergey Shtylyov
@ 2022-01-04 13:56 ` Dinh Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2022-01-04 13:56 UTC (permalink / raw)
To: Sergey Shtylyov, Minas.Harutyunyan; +Cc: Arthur.Petrosyan, gregkh, linux-usb
On 1/4/22 3:39 AM, Sergey Shtylyov wrote:
> Hello!
>
> On 1/4/22 5: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")
>
> Don't break up this line (perhaps could be fixed while applying).
>
My bad! Let me re-send.
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-04 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-01-04 9:39 ` Sergey Shtylyov
2022-01-04 13:56 ` Dinh Nguyen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.