• Mitch Williams's avatar
    i40evf: don't wait forever · 54e16f64
    Mitch Williams authored
    Under rare circumstances, after a reset, set_rx_mode might get called
    while the watchdog is running, which will cause a deadlock on the
    critical section lock. To correct this, add a counter and give up trying
    to get the lock after fifty tries. Log a message if this happens but
    don't take any other action. Because this happens after a reset, all of
    the Rx filters are still in place and the device won't lose
    connectivity.
    
    We can also get stuck during shutdown, if the PF has stopped communicating
    with us, or if a reset is occurring. If we can't get the lock after a reasonable
    amount of time, just error out. Something else bad is happening anyway, so
    adding this filter is the least of our concern right now.
    
    Change-ID: I159731e2a82a06b389ee31b34ce336548e05baa0
    Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
    Tested-by: default avatarJim Young <james.m.young@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    54e16f64
i40evf_main.c 67.1 KB