Linux USB
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Cc: stern@rowland.harvard.edu, mathias.nyman@intel.com,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/2] USB: Extend pci resume function to handle PM events
Date: Tue, 18 Apr 2023 17:23:32 +0200	[thread overview]
Message-ID: <2023041846-pang-cough-f739@gregkh> (raw)
In-Reply-To: <20230418140817.3651909-2-Basavaraj.Natikar@amd.com>

On Tue, Apr 18, 2023 at 07:38:16PM +0530, Basavaraj Natikar wrote:
> Currently, the pci_resume method has only a flag indicating whether the
> system is resuming from hibernation. In order to handle all PM events like
> AUTO_RESUME, SUSPEND etc change the pci_resume method to handle all PM
> events.
> 
> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> ---
>  drivers/usb/core/hcd-pci.c  | 14 ++++++++------
>  drivers/usb/host/ehci-pci.c |  3 ++-
>  drivers/usb/host/ohci-pci.c |  8 +++++++-
>  drivers/usb/host/uhci-pci.c | 10 +++++++---
>  drivers/usb/host/xhci-pci.c |  4 ++--
>  drivers/usb/host/xhci.c     |  3 ++-
>  drivers/usb/host/xhci.h     |  2 +-
>  include/linux/usb/hcd.h     |  2 +-
>  8 files changed, 30 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
> index ab2f3737764e..bef092da477a 100644
> --- a/drivers/usb/core/hcd-pci.c
> +++ b/drivers/usb/core/hcd-pci.c
> @@ -415,12 +415,15 @@ static int check_root_hub_suspended(struct device *dev)
>  	return 0;
>  }
>  
> -static int suspend_common(struct device *dev, bool do_wakeup)
> +static int suspend_common(struct device *dev, int event)

Shouldn't there be a PM_EVENT_* type for this so that we can properly
type-check that it is being used properly everywhere?  Much like we can
do for GFP_* flags?

Not the fault of this patch, just a general comment...

thanks,

greg k-h

  parent reply	other threads:[~2023-04-18 15:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 14:08 [PATCH 0/2] Handle PM events for pci resume Basavaraj Natikar
2023-04-18 14:08 ` [PATCH 1/2] USB: Extend pci resume function to handle PM events Basavaraj Natikar
2023-04-18 15:06   ` Alan Stern
2023-04-18 19:55     ` Basavaraj Natikar
2023-04-18 15:23   ` Greg KH [this message]
2023-04-18 19:57     ` Basavaraj Natikar
2023-04-18 14:08 ` [PATCH 2/2] xhci: Improve the XHCI resume time Basavaraj Natikar
2023-04-18 15:25   ` Greg KH
2023-04-18 20:10     ` Basavaraj Natikar
2023-04-20 17:03   ` Mark Hasemeyer
2023-04-21  4:58     ` Basavaraj Natikar
2023-04-24 15:05       ` Mathias Nyman
2023-04-25  0:09         ` Wesley Cheng
2023-04-25  9:04           ` Mathias Nyman
2023-04-25 19:54             ` Wesley Cheng
2023-04-25 10:20         ` Basavaraj Natikar

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=2023041846-pang-cough-f739@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=stern@rowland.harvard.edu \
    /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