[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVNOkXgg5nOkU4GiSqqOsEm4_+2FH+W=V8t6j_Cu8g3hPw@mail.gmail.com>
Date: Tue, 5 Mar 2013 21:16:35 +0800
From: Ming Lei <ming.lei@...onical.com>
To: "David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Kosina <jkosina@...e.cz>
Cc: Alan Stern <stern@...land.harvard.edu>,
Oliver Neukum <oneukum@...e.de>, netdev@...r.kernel.org,
linux-usb@...r.kernel.org, linux-input@...r.kernel.org,
Ming Lei <ming.lei@...onical.com>
Subject: Re: [PATCH 1/7] USB: adds comment on suspend callback
On Tue, Mar 5, 2013 at 12:01 PM, Ming Lei <ming.lei@...onical.com> wrote:
> This patch adds comments on interface driver suspend callback
> to emphasize that the failure return value is ignored by
> USB core in system sleep context, so do not try to recover
> device for this case.
>
> Signed-off-by: Ming Lei <ming.lei@...onical.com>
> ---
> include/linux/usb.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 4d22d0f..ea9d7cb 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -978,7 +978,10 @@ struct usbdrv_wrap {
> * the "usbfs" filesystem. This lets devices provide ways to
> * expose information to user space regardless of where they
> * do (or don't) show up otherwise in the filesystem.
> - * @suspend: Called when the device is going to be suspended by the system.
> + * @suspend: Called when the device is going to be suspended by the
> + * system either from system sleep or runtime suspend context, and
> + * its failed return value will be ignored in system sleep context,
> + * so do NOT try to recover device for this case.
> * @resume: Called when the device is being resumed by the system.
> * @reset_resume: Called when the suspended device has been reset instead
> * of being resumed.
On the other hand, resume()/reset_resume() should deal with the previous
suspend failure if the policy to ignore suspend failure is kept.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists