Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Ming Lei
On Tue, Mar 5, 2013 at 3:03 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei ming@canonical.com writes: Hi, 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

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Oliver Neukum
On Tuesday 05 March 2013 18:55:42 Ming Lei wrote: All these drivers suspend in multiple steps, where each step can fail. If a later step fails then they revert any previously successful step before returning the failure, thereby ensuring that the device/driver state when suspend returns is

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Ming Lei
On Tue, Mar 5, 2013 at 8:50 PM, Oliver Neukum oneu...@suse.de wrote: IMO, for autosuspend, that is right, but it is not for system suspend, and the driver's suspend callback can't return in resumed state because the USB core will ignore the failure return value and force to suspend the

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Bjørn Mork
Ming Lei ming@canonical.com writes: On Tue, Mar 5, 2013 at 3:03 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei ming@canonical.com writes: Hi, This patch adds comments on interface driver suspend callback to emphasize that the failure return value is ignored by USB core in system

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Oliver Neukum
On Tuesday 05 March 2013 21:08:09 Ming Lei wrote: On Tue, Mar 5, 2013 at 8:50 PM, Oliver Neukum oneu...@suse.de wrote: In other words, if we don't handle errors, there must be no errors, otherwise it doesn't matter what we do in the error case. We'd leave the problem to generic layers.

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-05 Thread Ming Lei
On Tue, Mar 5, 2013 at 9:28 PM, Oliver Neukum oneu...@suse.de wrote: On Tuesday 05 March 2013 21:08:09 Ming Lei wrote: On Tue, Mar 5, 2013 at 8:50 PM, Oliver Neukum oneu...@suse.de wrote: In other words, if we don't handle errors, there must be no errors, otherwise it doesn't matter what we

[PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-04 Thread Ming Lei
Hi, 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, otherwise the URB traffic scheduled in recovery of failure path may cross system sleep, and

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-04 Thread Ming Lei
On Tue, Mar 5, 2013 at 12:01 PM, Ming Lei ming@canonical.com wrote: Hi, 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, otherwise the

Re: [PATCH 0/7] USB: don't recover device if suspend fails in system sleep

2013-03-04 Thread Bjørn Mork
Ming Lei ming@canonical.com writes: Hi, 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, otherwise the URB traffic scheduled in