diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 21e3a3e70329..95588fe0e22f 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -2250,7 +2250,7 @@ int ice_vsi_release(struct ice_vsi *vsi) | |||
2250 | * currently. This is done to avoid check_flush_dependency() warning | 2250 | * currently. This is done to avoid check_flush_dependency() warning |
2251 | * on this wq | 2251 | * on this wq |
2252 | */ | 2252 | */ |
2253 | if (vsi->netdev && !ice_is_reset_recovery_pending(pf->state)) { | 2253 | if (vsi->netdev && !ice_is_reset_in_progress(pf->state)) { |
2254 | unregister_netdev(vsi->netdev); | 2254 | unregister_netdev(vsi->netdev); |
2255 | free_netdev(vsi->netdev); | 2255 | free_netdev(vsi->netdev); |
2256 | vsi->netdev = NULL; | 2256 | vsi->netdev = NULL; |
@@ -2280,7 +2280,7 @@ int ice_vsi_release(struct ice_vsi *vsi) | |||
2280 | * free VSI netdev when PF is not in reset recovery pending state,\ | 2280 | * free VSI netdev when PF is not in reset recovery pending state,\ |
2281 | * for ex: during rmmod. | 2281 | * for ex: during rmmod. |
2282 | */ | 2282 | */ |
2283 | if (!ice_is_reset_recovery_pending(pf->state)) | 2283 | if (!ice_is_reset_in_progress(pf->state)) |
2284 | ice_vsi_clear(vsi); | 2284 | ice_vsi_clear(vsi); |
2285 | 2285 | ||
2286 | return 0; | 2286 | return 0; |
@@ -2367,10 +2367,13 @@ err_vsi: | |||
2367 | } | 2367 | } |
2368 | 2368 | ||
2369 | /** | 2369 | /** |
2370 | * ice_is_reset_recovery_pending - schedule a reset | 2370 | * ice_is_reset_in_progress - check for a reset in progress |
2371 | * @state: pf state field | 2371 | * @state: pf state field |
2372 | */ | 2372 | */ |
2373 | bool ice_is_reset_recovery_pending(unsigned long *state) | 2373 | bool ice_is_reset_in_progress(unsigned long *state) |
2374 | { | 2374 | { |
2375 | return test_bit(__ICE_RESET_RECOVERY_PENDING, state); | 2375 | return test_bit(__ICE_RESET_OICR_RECV, state) || |
2376 | test_bit(__ICE_PFR_REQ, state) || | ||
2377 | test_bit(__ICE_CORER_REQ, state) || | ||
2378 | test_bit(__ICE_GLOBR_REQ, state); | ||
2376 | } | 2379 | } |