• Sukadev Bhattiprolu's avatar
    powerpc/vnic: Extend "failover pending" window · 1d850493
    Sukadev Bhattiprolu authored
    Commit 5a18e1e0 introduced the 'failover_pending' state to track
    the "failover pending window" - where we wait for the partner to become
    ready (after a transport event) before actually attempting to failover.
    i.e window is between following two events:
    
            a. we get a transport event due to a FAILOVER
    
            b. later, we get CRQ_INITIALIZED indicating the partner is
               ready  at which point we schedule a FAILOVER reset.
    
    and ->failover_pending is true during this window.
    
    If during this window, we attempt to open (or close) a device, we pretend
    that the operation succeded and let the FAILOVER reset path complete the
    operation.
    
    This is fine, except if the transport event ("a" above) occurs during the
    open and after open has already checked whether a failover is pending. If
    that happens, we fail the open, which can cause the boot scripts to leave
    the interface down requiring administrator to manually bring up the device.
    
    This fix "extends"...
    1d850493
ibmvnic.c 144 KB