• Alan Stern's avatar
    USB: handle LPM errors during device suspend correctly · aa5ceae2
    Alan Stern authored
    The hub driver's usb_port_suspend() routine doesn't handle errors
    related to Link Power Management properly.  It always returns failure,
    it doesn't try to clean up the wakeup setting, (in the case of system
    sleep) it doesn't try to go ahead with the port suspend regardless,
    and it doesn't try to apply the new power-off mechanism.
    
    This patch fixes these problems.
    
    Note: Sarah fixed this patch to apply against 3.11, since the original
    commit (4fae6f0f "USB: handle LPM errors
    during device suspend correctly") called usb_disable_remote_wakeup,
    which won't be added until 3.12.
    
    This patch should be backported to kernels as old as 3.5, that
    contain the commit 8306095f "USB:
    Disable USB 3.0 LPM in critical sections.".  There will be merge
    conflicts, since LTM wasn't added until 3.6.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
    Cc: stable@vger.kernel.org
    aa5ceae2
hub.c 154 KB