All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lu, Baolu" <baolu.lu@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] usb: xhci: implement device_suspend/device_resume entries
Date: Thu, 07 May 2015 08:30:43 +0800	[thread overview]
Message-ID: <554AB233.4060608@linux.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1505061029100.1094-100000@iolanthe.rowland.org>



On 05/06/2015 10:30 PM, Alan Stern wrote:
> On Wed, 6 May 2015, Lu Baolu wrote:
>
>> This patch implements device_suspend/device_resume entries for xHC driver.
>> device_suspend will be called when a USB device is about to suspend. It
>> will issue a stop endpoint command for each endpoint in this device. The
>> Suspend(SP) bit in the command TRB will set which will give xHC a hint
>> about the suspend. device_resume will be called when a USB device is just
>> resumed. It will ring doorbells of all endpoint unconditionally. XHC may
>> use these suspend/resume hints to optimize its operation.
>>
>> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ...
>
>>   #else /* CONFIG_PM */
>>   
>>   int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
>> @@ -4704,6 +4728,16 @@ int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd,
>>   {
>>   	return 0;
>>   }
>> +
>> +void xhci_device_suspend(struct usb_hcd *hcd,
>> +			struct usb_device *udev, pm_message_t msg)
>> +{
>> +}
>> +
>> +void xhci_device_resume(struct usb_hcd *hcd,
>> +			struct usb_device *udev, pm_message_t msg)
>> +{
>> +}
> You don't need to have empty functions.  Just do this:
>
> #define xhci_device_suspend	NULL
> #define xhci_device_resume	NULL
>
> in the appropriate place, when CONFIG_PM is not enabled.

Yes, I agree. I will change it.

>
> Alan Stern

Thank you,
Baolu

>
>
>


  reply	other threads:[~2015-05-07  0:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  7:39 [PATCH v2 0/3] usb: notify hcd when USB device suspend or resume Lu Baolu
2015-05-06  7:40 ` [PATCH v2 1/3] " Lu Baolu
2015-05-06 14:35   ` Alan Stern
2015-05-07  0:27     ` Lu, Baolu
2015-05-07 14:34       ` Alan Stern
2015-05-08  1:14         ` Lu, Baolu
2015-05-08 14:21           ` Alan Stern
2015-05-09  0:42             ` Lu, Baolu
2015-05-11 14:25               ` Alan Stern
2015-05-12  2:05                 ` Lu, Baolu
2015-05-12 15:54                   ` Alan Stern
2015-05-13  2:36                     ` Lu, Baolu
2015-05-13 14:14                       ` Alan Stern
2015-05-08  7:55     ` Lu, Baolu
2015-05-06  7:40 ` [PATCH v2 2/3] usb: xhci: implement device_suspend/device_resume entries Lu Baolu
2015-05-06 14:30   ` Alan Stern
2015-05-07  0:30     ` Lu, Baolu [this message]
2015-05-06  7:40 ` [PATCH v2 3/3] usb: xhci: remove stop device and ring doorbell in hub control and bus suspend Lu Baolu

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=554AB233.4060608@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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 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.