On Tuesday 05 March 2013 21:08:09 Ming Lei wrote: > On Tue, Mar 5, 2013 at 8:50 PM, Oliver Neukum <oneukum@xxxxxxx> 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. > > Generic layers can't handle the driver's specific failure. We depend on stopping the HC forcing all devices into suspend. We know this is problematic. For example some disk enclosures need to flush cache. Fortunately for us this is done in the SCSI layer. > If driver records its suspend failure state in suspend(), resume() > should and can deal with it without much difficulty. Yes, but why bother? Either we can safely suspend in any state or we must not ignore errors. > > Furthermore there is a small chance that although the device tree > > is walked, teh system suspend fails for another later reason that > > is not ignored. In that case the drivers need to do error recovery, > > albeit in resume(). > > Yes, resume() need to handle the USB system suspend failure > either in normal resume or error recovery, both are basically same. In theory yes, in practice usually power is cut. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html