• Alan Stern's avatar
    USB: fix race in autosuspend reschedule · d1aa3e6a
    Alan Stern authored
    This patch (as1002) fixes a small race which can occur when a driver
    expects usbcore to reschedule an autosuspend request.  If the request
    arrives too late, it won't be rescheduled.  The patch adds an extra
    argument to autosuspend_check(), indicating that a reschedule is
    needed no matter how much time has elapsed.
    
    It also tries to avoid letting asynchronous changes to the value of
    jiffies cause a delay to become negative, by caching a local copy of
    the current time.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    d1aa3e6a
driver.c 47.4 KB