• Mitch Williams's avatar
    i40evf: refactor reset handling · ef8693eb
    Mitch Williams authored
    Respond better to a VF reset event. When a reset is signaled by the
    PF, or detected by the watchdog task, prevent the watchdog from
    processing admin queue requests, and schedule the reset task.
    
    In the reset task, wait first for the reset to start, then for it to
    complete, then reinit the driver.
    
    If the reset never appears to complete after a long, long time (>10
    seconds is possible depending on what's going on with the PF driver),
    then set a flag to indicate that PF communications have failed.
    
    If this flag is set, check for the reset to complete in the watchdog,
    and  attempt to do a full reinitialization of the driver from scratch.
    
    With these changes the VF driver correctly handles a PF reset event
    while running on bare metal, or in a VM.
    
    Also update copyrights.
    
    Change-ID: I93513efd0b50523a8345e7f6a33a5e4f8a2a5996
    Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
    Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
    Tested-by: default avatarSibai Li <sibai.li@intel.com>
    Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ef8693eb
i40evf_virtchnl.c 23.1 KB