[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wqtlommw.fsf@nemi.mork.no>
Date: Tue, 05 Mar 2013 17:08:07 +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 4/7] usbnet: cdc_mbim: don't recover device if suspend fails in system sleep
Ming Lei <ming.lei@...onical.com> writes:
> Yes, USB core will flush any outstanding URBs, but the driver still need
> to deal with suspend failure carefully, for example, suppose usb_resume()
> is called in suspend failure path, and the submitted URBs are killed
> by USB core later. But after the device is wakeup, and the resume() will
> do nothing since the suspend count is leaked. So it is what the patches
> are fixing, and it is better to not depend on the default flushing URBs of
> USB core.
I am starting to wonder why the USB core has combined system suspend and
runtime suspend if we are going to end up with every driver testing
PMSG_IS_AUTO(message) and selecting a completely different code path.
You are right that we will end up with problems if usbnet_resume is
called for a device usbnet hasn't suspended. But I'd still claim that
is a bug in the USB core, which is the one that decided to ignore the
suspend error and still call resume.
I guess proper error handling here require the USB core to see the
interface driver as dead if it fails to suspend on system suspend, and
do forced rebinding on resume.
I am not going to fight this any longer. The per-driver
PMSG_IS_AUTO(message) testing is an ugly workround for a core problem,
but they are already all over the place... Still, please make sure the
drivers all return 0 if they are pretending to suspend. No error code
return if the driver ignores the error.
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