• A
    USB: Don't rebind before "complete" callback · 5096aedc
    Alan Stern 提交于
    This patch (as1130) fixes an incompatibility between the new PM
    infrastructure and USB power management.  We are not allowed to call
    drivers' probe routines during a system sleep transition between the
    "prepare" and "complete" callbacks, but that's exactly what we do when
    a driver doesn't have full suspend/resume support.  Such drivers are
    unbound during the "suspend" call and reprobed during the "resume" call.
    
    The patch causes the reprobe step to be skipped if the "complete"
    callback hasn't been issued yet, i.e., if the interface's
    dev.power.status field is not equal to DPM_ON.  Thus during the
    "resume" callback nothing bad will happen, and during the final
    "complete" callback the reprobing will occur as desired.
    
    This fixes the problem reported in Bugzilla #11263.
    Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    5096aedc
driver.c 49.3 KB