lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 May 2015 10:30:55 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Lu Baolu <baolu.lu@...ux.intel.com>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mathias Nyman <mathias.nyman@...el.com>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] usb: xhci: implement device_suspend/device_resume
 entries

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@...ux.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.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ