• Alan Stern's avatar
    USB: obey the sysfs power/wakeup setting · 48826626
    Alan Stern authored
    This patch (as1403) is a partial reversion of an earlier change
    (commit 5f677f1d "USB: fix remote
    wakeup settings during system sleep").  After hearing from a user, I
    realized that remote wakeup should be enabled during system sleep
    whenever userspace allows it, and not only if a driver requests it
    too.
    
    Indeed, there could be a device with no driver, that does nothing but
    generate a wakeup request when the user presses a button.  Such a
    device should be allowed to do its job.
    
    The problem fixed by the earlier patch -- device generating a wakeup
    request for no reason, causing system suspend to abort -- was also
    addressed by a later patch ("USB: don't enable remote wakeup by
    default", accepted but not yet merged into mainline).  The device
    won't be able to generate the bogus wakeup requests because it will be
    disabled for remote wakeup by default.  Hence this reversion will not
    re-introduce any old problems.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Cc: stable <stable@kernel.org> [.34]
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    
    48826626
driver.c 51.5 KB