* Re: [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0
[not found] <20210318061333.D6F9CA022F@mailhost.synopsys.com>
@ 2021-03-18 6:23 ` Minas Harutyunyan
2021-03-23 11:25 ` Greg Kroah-Hartman
1 sibling, 0 replies; 4+ messages in thread
From: Minas Harutyunyan @ 2021-03-18 6:23 UTC (permalink / raw)
To: Artur Petrosyan, Felipe Balbi, Greg Kroah-Hartman, linux-usb; +Cc: John Youn
On 3/18/2021 10:13 AM, Artur Petrosyan wrote:
> In host mode port connection status flag is "0" when loading
> the driver. After loading the driver system asserts suspend
> which is handled by "_dwc2_hcd_suspend()" function. Before
> the system suspend the port connection status is "0". As
> result need to check the "port_connect_status" if it is "0",
> then skipping entering to suspend.
>
> Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
> ---
> drivers/usb/dwc2/hcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 40e5655921bf..1a9789ec5847 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -4322,7 +4322,8 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
> if (hsotg->op_state == OTG_STATE_B_PERIPHERAL)
> goto unlock;
>
> - if (hsotg->params.power_down > DWC2_POWER_DOWN_PARAM_PARTIAL)
> + if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL ||
> + hsotg->flags.b.port_connect_status == 0)
> goto skip_power_saving;
>
> /*
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0
[not found] <20210318061333.D6F9CA022F@mailhost.synopsys.com>
2021-03-18 6:23 ` [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0 Minas Harutyunyan
@ 2021-03-23 11:25 ` Greg Kroah-Hartman
1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-03-23 11:25 UTC (permalink / raw)
To: Artur Petrosyan; +Cc: Felipe Balbi, Minas Harutyunyan, linux-usb, John Youn
On Thu, Mar 18, 2021 at 10:13:32AM +0400, Artur Petrosyan wrote:
> In host mode port connection status flag is "0" when loading
> the driver. After loading the driver system asserts suspend
> which is handled by "_dwc2_hcd_suspend()" function. Before
> the system suspend the port connection status is "0". As
> result need to check the "port_connect_status" if it is "0",
> then skipping entering to suspend.
As before, is this a bugfix and needs to go to stable kernels? If so,
what commit does this fix?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0
2021-03-26 10:25 Artur Petrosyan
@ 2021-03-26 13:33 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-03-26 13:33 UTC (permalink / raw)
To: Artur Petrosyan
Cc: Felipe Balbi, Minas Harutyunyan, linux-usb, Douglas Anderson,
John Youn, Paul Zimmerman, stable, #,
5.2, Felipe Balbi, Kever Yang
On Fri, Mar 26, 2021 at 02:25:09PM +0400, Artur Petrosyan wrote:
> In host mode port connection status flag is "0" when loading
> the driver. After loading the driver system asserts suspend
> which is handled by "_dwc2_hcd_suspend()" function. Before
> the system suspend the port connection status is "0". As
> result need to check the "port_connect_status" if it is "0",
> then skipping entering to suspend.
>
> Cc: <stable@vger.kernel.org> # 5.2
> Fixes: 6f6d70597c15 ("usb: dwc2: bus suspend/resume for hosts with
> DWC2_POWER_DOWN_PARAM_NONE")
In the future, do not line-wrap the fixes line.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0
@ 2021-03-26 10:25 Artur Petrosyan
2021-03-26 13:33 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Artur Petrosyan @ 2021-03-26 10:25 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, Minas Harutyunyan, linux-usb,
Douglas Anderson
Cc: John Youn, Artur Petrosyan, Paul Zimmerman, stable, #,
5.2, Felipe Balbi, Kever Yang
In host mode port connection status flag is "0" when loading
the driver. After loading the driver system asserts suspend
which is handled by "_dwc2_hcd_suspend()" function. Before
the system suspend the port connection status is "0". As
result need to check the "port_connect_status" if it is "0",
then skipping entering to suspend.
Cc: <stable@vger.kernel.org> # 5.2
Fixes: 6f6d70597c15 ("usb: dwc2: bus suspend/resume for hosts with
DWC2_POWER_DOWN_PARAM_NONE")
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
---
drivers/usb/dwc2/hcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 40e5655921bf..1a9789ec5847 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -4322,7 +4322,8 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
if (hsotg->op_state == OTG_STATE_B_PERIPHERAL)
goto unlock;
- if (hsotg->params.power_down > DWC2_POWER_DOWN_PARAM_PARTIAL)
+ if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL ||
+ hsotg->flags.b.port_connect_status == 0)
goto skip_power_saving;
/*
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-26 13:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210318061333.D6F9CA022F@mailhost.synopsys.com>
2021-03-18 6:23 ` [PATCH 3/3] usb: dwc2: Prevent core suspend when port connection flag is 0 Minas Harutyunyan
2021-03-23 11:25 ` Greg Kroah-Hartman
2021-03-26 10:25 Artur Petrosyan
2021-03-26 13:33 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).