linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>
Subject: Re: [PATCH v2 01/15] usb: dwc2: Update exit hibernation when port reset is asserted
Date: Mon, 19 Apr 2021 07:30:19 +0000	[thread overview]
Message-ID: <eae54d3f-3382-133a-ce49-dc23476e6b4d@synopsys.com> (raw)
In-Reply-To: <20210416124651.51C8DA005C@mailhost.synopsys.com>

On 4/16/2021 4:46 PM, Artur Petrosyan wrote:
> No need to check for "DWC2_POWER_DOWN_PARAM_HIBERNATION" param
> as "hsotg->hibernated" flag is already enough for exiting from
> hibernation mode.
> 
> - Removes checking of "DWC2_POWER_DOWN_PARAM_HIBERNATION" param.
> 
> - For code readability Hibernation exit code moved after
> debug message print.
> 
> - Added "dwc2_exit_hibernation()" function error checking.
> 
> Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>

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

> ---
>   Changes in v2:
>   - None
> 
>   drivers/usb/dwc2/hcd.c | 17 +++++++++++------
>   1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 04a1b53d65af..cda3f931195d 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -3668,9 +3668,17 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
>   			break;
>   
>   		case USB_PORT_FEAT_RESET:
> -			if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_HIBERNATION &&
> -			    hsotg->hibernated)
> -				dwc2_exit_hibernation(hsotg, 0, 1, 1);
> +			dev_dbg(hsotg->dev,
> +				"SetPortFeature - USB_PORT_FEAT_RESET\n");
> +
> +			hprt0 = dwc2_read_hprt0(hsotg);
> +
> +			if (hsotg->hibernated) {
> +				retval = dwc2_exit_hibernation(hsotg, 0, 1, 1);
> +				if (retval)
> +					dev_err(hsotg->dev,
> +						"exit hibernation failed\n");
> +			}
>   
>   			if (hsotg->in_ppd) {
>   				retval = dwc2_exit_partial_power_down(hsotg, 1,
> @@ -3684,9 +3692,6 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
>   			    DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended)
>   				dwc2_host_exit_clock_gating(hsotg, 0);
>   
> -			hprt0 = dwc2_read_hprt0(hsotg);
> -			dev_dbg(hsotg->dev,
> -				"SetPortFeature - USB_PORT_FEAT_RESET\n");
>   			pcgctl = dwc2_readl(hsotg, PCGCTL);
>   			pcgctl &= ~(PCGCTL_ENBL_SLEEP_GATING | PCGCTL_STOPPCLK);
>   			dwc2_writel(hsotg, pcgctl, PCGCTL);
> 


  reply	other threads:[~2021-04-19  7:30 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1618464534.git.Arthur.Petrosyan@synopsys.com>
2021-04-15  5:39 ` [PATCH 01/15] usb: dwc2: Update exit hibernation when port reset is asserted Artur Petrosyan
2021-04-15  5:39 ` [PATCH 02/15] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2021-04-15  5:39 ` [PATCH 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow Artur Petrosyan
2021-04-15  5:39 ` [PATCH 04/15] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2021-04-15  5:40 ` [PATCH 05/15] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2021-04-15  5:40 ` [PATCH 06/15] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2021-04-15  5:40 ` [PATCH 07/15] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
2021-04-15  5:40 ` [PATCH 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function Artur Petrosyan
2021-04-15  5:40 ` [PATCH 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function Artur Petrosyan
2021-04-15  5:40 ` [PATCH 10/15] usb: dwc2: Allow exit hibernation in urb enqueue Artur Petrosyan
2021-04-15  9:12   ` Sergei Shtylyov
2021-04-16  5:43     ` Artur Petrosyan
2021-04-16  7:05       ` Artur Petrosyan
2021-04-15  5:40 ` [PATCH 11/15] usb: dwc2: Add hibernation entering flow by system suspend Artur Petrosyan
2021-04-15  5:40 ` [PATCH 12/15] usb: dwc2: Add hibernation exiting flow by system resume Artur Petrosyan
2021-04-15  5:41 ` [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive Artur Petrosyan
2021-04-15  9:24   ` Sergei Shtylyov
2021-04-16  5:46     ` Artur Petrosyan
2021-04-15  9:50   ` kernel test robot
2021-04-15 13:40   ` [kbuild] " Dan Carpenter
2021-04-15  5:41 ` [PATCH 14/15] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2021-04-15  5:41 ` [PATCH 15/15] usb: dwc2: Get rid of useless error checks in suspend interrupt Artur Petrosyan
2021-04-16 12:46 ` [PATCH v2 00/15] usb: dwc2: Fix Hibernation issues Artur Petrosyan
2021-04-16 12:46 ` [PATCH v2 01/15] usb: dwc2: Update exit hibernation when port reset is asserted Artur Petrosyan
2021-04-19  7:30   ` Minas Harutyunyan [this message]
2021-04-16 12:46 ` [PATCH v2 02/15] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow Artur Petrosyan
2021-04-19  7:30   ` Minas Harutyunyan
2021-04-16 12:47 ` [PATCH v2 04/15] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 05/15] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 06/15] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 07/15] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:47 ` [PATCH v2 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 10/15] usb: dwc2: Allow exit hibernation in urb enqueue Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 11/15] usb: dwc2: Add hibernation entering flow by system suspend Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 12/15] usb: dwc2: Add hibernation exiting flow by system resume Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 13/15] usb: dwc2: Add exit hibernation mode before removing drive Artur Petrosyan
2021-04-19  7:32   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 14/15] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2021-04-16 12:48 ` [PATCH v2 15/15] usb: dwc2: Get rid of useless error checks in suspend interrupt Artur Petrosyan
2021-04-19  7:32   ` Minas Harutyunyan

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=eae54d3f-3382-133a-ce49-dc23476e6b4d@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).