Linux USB
 help / color / mirror / Atom feed
From: Basavaraj Natikar <bnatikar@amd.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	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: Wed, 19 Apr 2023 01:27:05 +0530	[thread overview]
Message-ID: <14b9212d-2679-c776-bc39-5d6bbd4b1f2b@amd.com> (raw)
In-Reply-To: <2023041846-pang-cough-f739@gregkh>


On 4/18/2023 8:53 PM, Greg KH wrote:
> 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?

yes correct , will change in all place accordingly by using pm_message_t type.

Thanks,
--
Basavaraj

> Not the fault of this patch, just a general comment...
>
> thanks,
>
> greg k-h


  reply	other threads:[~2023-04-18 19:57 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
2023-04-18 19:57     ` Basavaraj Natikar [this message]
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=14b9212d-2679-c776-bc39-5d6bbd4b1f2b@amd.com \
    --to=bnatikar@amd.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --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