On Wed, 2 May 2012, Sarah Sharp wrote: > One place I forgot to mention where USB 3.0 LPM needs to be disabled is > when we want to suspend the device. That's because the USB 3.0 spec > doesn't define any sort of transition from the USB 3.0 link states > (U1/U2) to selective suspend (U3). The device has to be active (in U0). > Andiry had to do something similar for USB 2.0 LPM. > > I think that means we have to have a call to disable USB3 LPM in > usb_port_suspend, and a call to re-enable it in usb_port_resume. > > What happens if usb_port_suspend fails? Will usb_port_resume be > automatically called? Will usb_port_suspend always be called before > usb_port_resume? I'm trying to figure out how to balance the USB > 3.0 LPM disable count. The assumption is that if usb_port_suspend() fails then the port isn't suspended, so it doesn't need to be resumed. It looks like the current code does not re-enable LPM in that situation. usb_port_resume() should never be called without a preceding successful usb_port_suspend(). Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html