All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>
Subject: [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function.
Date: Fri, 26 Apr 2019 13:51:03 -0700	[thread overview]
Message-ID: <CAD=FV=UNL-=n1CW+pQ2U4T1Mth5-qEY6ycp70jE8zqTTWE8BDQ@mail.gmail.com> (raw)

Hi,

On Fri, Apr 19, 2019 at 11:53 AM Artur Petrosyan
<Arthur.Petrosyan@synopsys.com> wrote:
>
> To avoid working in two modes (partial power down
> and hibernation) changed conditions for entering
> partial power down or hibernation.
>
> Instead of checking hw_params.power_optimized and
> hw_params.hibernation now checking power_down
> param which already set to one of the options
> (Hibernation or Partial Power Down) based on
> OTG_EN_PWROPT.
>
> Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>  drivers/usb/dwc2/core_intr.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

In general I'm in support of this patch--it's cleaner and gets rid of
a needless goto \o/

...but you don't go far enough.  You can fully get rid of all of the
"-ENOTSUPP" stuff.  I've actually picked my patches and yours atop
Felipe's "testing/next" tree and you can find it here:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+log/refs/sandbox/dianders/190426-dwc2-stuff

...as part of that I've included a patch ("usb: dwc2: Get rid of
useless error checks for hibernation/partial power down"), AKA:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/0c924f736e2f7c1bb02531aa33c04a3ae5f4fc4c

Feel free to squash that into your patch or add it to your series if
you like it.  Note that patch points out that there's are still some
instances where calling dwc2_exit_partial_power_down() might still
happen in a case where it's not obvious if we were in partial power
down mode and made me wonder if there might be some bugs there.

-Doug

WARNING: multiple messages have this Message-ID (diff)
From: Doug Anderson <dianders@chromium.org>
To: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>
Subject: Re: [PATCH v1 09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function.
Date: Fri, 26 Apr 2019 13:51:03 -0700	[thread overview]
Message-ID: <CAD=FV=UNL-=n1CW+pQ2U4T1Mth5-qEY6ycp70jE8zqTTWE8BDQ@mail.gmail.com> (raw)
Message-ID: <20190426205103.jUHEakzPxBorfumERh3sMixmZ2GT8VxwTZnKXjFNxfs@z> (raw)
In-Reply-To: <edf4726d21dd5a00013e5c26ac783906bc589d4d.1555672441.git.arturp@synopsys.com>

Hi,

On Fri, Apr 19, 2019 at 11:53 AM Artur Petrosyan
<Arthur.Petrosyan@synopsys.com> wrote:
>
> To avoid working in two modes (partial power down
> and hibernation) changed conditions for entering
> partial power down or hibernation.
>
> Instead of checking hw_params.power_optimized and
> hw_params.hibernation now checking power_down
> param which already set to one of the options
> (Hibernation or Partial Power Down) based on
> OTG_EN_PWROPT.
>
> Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>  drivers/usb/dwc2/core_intr.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

In general I'm in support of this patch--it's cleaner and gets rid of
a needless goto \o/

...but you don't go far enough.  You can fully get rid of all of the
"-ENOTSUPP" stuff.  I've actually picked my patches and yours atop
Felipe's "testing/next" tree and you can find it here:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+log/refs/sandbox/dianders/190426-dwc2-stuff

...as part of that I've included a patch ("usb: dwc2: Get rid of
useless error checks for hibernation/partial power down"), AKA:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/0c924f736e2f7c1bb02531aa33c04a3ae5f4fc4c

Feel free to squash that into your patch or add it to your series if
you like it.  Note that patch points out that there's are still some
instances where calling dwc2_exit_partial_power_down() might still
happen in a case where it's not obvious if we were in partial power
down mode and made me wonder if there might be some bugs there.

-Doug

             reply	other threads:[~2019-04-26 20:51 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 20:51 Doug Anderson [this message]
2019-04-26 20:51 ` [PATCH v1 09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Doug Anderson
  -- strict thread matches above, loose matches on Subject: below --
2019-05-03  8:13 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-05-03  8:13 ` [PATCH v1 04/14] " Artur Petrosyan
2019-05-03  7:58 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-05-03  7:58 ` [PATCH v1 08/14] " Artur Petrosyan
2019-05-01  1:54 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-05-01  1:54 ` [PATCH v1 04/14] " Doug Anderson
2019-04-30 15:23 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-30 15:23 ` [PATCH v1 08/14] " Doug Anderson
2019-04-30 13:06 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-30 13:06 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-30 12:45 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-30 12:45 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-30  7:10 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-30  7:10 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-29 17:42 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Doug Anderson
2019-04-29 17:42 ` [PATCH v1 14/14] " Doug Anderson
2019-04-29 17:40 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-29 17:40 ` [PATCH v1 08/14] " Doug Anderson
2019-04-29 17:35 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-04-29 17:35 ` [PATCH v1 04/14] " Doug Anderson
2019-04-29 12:01 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-29 12:01 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-29 11:35 [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2019-04-29 11:35 ` [PATCH v1 09/14] " Artur Petrosyan
2019-04-29 11:29 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-29 11:29 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-29 11:03 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-29 11:03 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-29 10:54 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Artur Petrosyan
2019-04-29 10:54 ` [PATCH v1 03/14] " Artur Petrosyan
2019-04-26 21:00 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Doug Anderson
2019-04-26 21:00 ` [PATCH v1 14/14] " Doug Anderson
2019-04-26 20:51 [v1,12/14] usb: dwc2: Clear fifo_map when resetting core Doug Anderson
2019-04-26 20:51 ` [PATCH v1 12/14] " Doug Anderson
2019-04-26 20:46 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-26 20:46 ` [PATCH v1 08/14] " Doug Anderson
2019-04-26 20:45 [v1,06/14] usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change() Doug Anderson
2019-04-26 20:45 ` [PATCH v1 06/14] " Doug Anderson
2019-04-26 20:45 [v1,05/14] usb: dwc2: Add port conn. sts. checking in _dwc2_hcd_resume() function Doug Anderson
2019-04-26 20:45 ` [PATCH v1 05/14] " Doug Anderson
2019-04-26 20:44 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-04-26 20:44 ` [PATCH v1 04/14] " Doug Anderson
2019-04-26 20:44 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Doug Anderson
2019-04-26 20:44 ` [PATCH v1 03/14] " Doug Anderson
2019-04-19 11:25 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-19 11:25 [v1,13/14] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 13/14] " Artur Petrosyan
2019-04-19 11:25 [v1,12/14] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 12/14] " Artur Petrosyan
2019-04-19 11:25 [v1,11/14] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 11/14] " Artur Petrosyan
2019-04-19 11:25 [v1,10/14] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 10/14] " Artur Petrosyan
2019-04-19 11:24 [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 09/14] " Artur Petrosyan
2019-04-19 11:24 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-19 11:24 [v1,07/14] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 07/14] " Artur Petrosyan
2019-04-19 11:24 [v1,06/14] usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change() Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 06/14] " Artur Petrosyan
2019-04-19 11:24 [v1,05/14] usb: dwc2: Add port conn. sts. checking in _dwc2_hcd_resume() function Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 05/14] " Artur Petrosyan
2019-04-19 11:24 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-19 11:23 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 03/14] " Artur Petrosyan
2019-04-19 11:23 [v1,02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 02/14] " Artur Petrosyan
2019-04-19 11:23 [v1,01/14] usb: dwc2: Fix dwc2_restore_device_registers() function Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 01/14] " Artur Petrosyan
2019-04-19 11:23 [PATCH v1 00/14] usb: dwc2: Fix and improve power saving modes Artur Petrosyan
2019-04-25 12:43 ` Felipe Balbi
2019-04-25 14:00   ` Artur Petrosyan
2019-04-25 20:12     ` Doug Anderson
2019-04-26  7:10       ` Artur Petrosyan
2019-04-26 16:01         ` Doug Anderson
2019-04-26 21:06           ` Doug Anderson
2019-04-29 12:05             ` Artur Petrosyan
2019-04-29 17:43               ` Doug Anderson
2019-04-29  8:44           ` Artur Petrosyan

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='CAD=FV=UNL-=n1CW+pQ2U4T1Mth5-qEY6ycp70jE8zqTTWE8BDQ@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=balbi@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 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.