[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ppzcmven.fsf@nemi.mork.no>
Date: Wed, 06 Mar 2013 15:53:52 +0100
From: Bjørn Mork <bjorn@...k.no>
To: Ming Lei <ming.lei@...onical.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Kosina <jkosina@...e.cz>,
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
Subject: Re: [PATCH v1 4/7] usbnet: cdc_mbim: don't recover device if suspend fails in system sleep
Ming Lei <ming.lei@...onical.com> writes:
> On Wed, Mar 6, 2013 at 8:04 PM, Bjørn Mork <bjorn@...k.no> wrote:
>
>> I believe the correct here is to document the fact that we require the
>> subdriver->suspend() callback to always return 0 if !PMSG_IS_AUTO(message).
>> That is best done with a comment. No need to add any redundant code.
>
> Considered that the subdriver might change its return value in future,
Not likely. It lives under the exact same restrictions as a standalone
USB interface driver. If it starts returning something else, then this
driver should probably do so as well.
> how about just add the below comment?
>
> /* TODO: resume() might need to handle suspend failure from subdriver */
OK with me if that includes dropping the redundant code change.
Note that the same issue and comment applies to the usbnet_suspend()
call as well. We currently rely on both calls to always return 0 on
system suspend. Which they are guaranteed to do, because they are both
directly used as .suspend callbacks in other USB interface drivers.
Bjørn
--
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