Commit 18f141bf authored by Dany Madden's avatar Dany Madden Committed by Jakub Kicinski

ibmvnic: stop free_all_rwi on failed reset

When ibmvnic fails to reset, it breaks out of the reset loop and frees
all of the remaining resets from the workqueue. Doing so prevents the
adapter from recovering if no reset is scheduled after that. Instead,
have the driver continue to process resets on the workqueue.

Remove the no longer need free_all_rwi().

Fixes: ed651a10 ("ibmvnic: Updated reset handling")
Signed-off-by: default avatarDany Madden <drt@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 31d6b403
...@@ -2173,17 +2173,6 @@ static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter) ...@@ -2173,17 +2173,6 @@ static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
return rwi; return rwi;
} }
static void free_all_rwi(struct ibmvnic_adapter *adapter)
{
struct ibmvnic_rwi *rwi;
rwi = get_next_rwi(adapter);
while (rwi) {
kfree(rwi);
rwi = get_next_rwi(adapter);
}
}
static void __ibmvnic_reset(struct work_struct *work) static void __ibmvnic_reset(struct work_struct *work)
{ {
struct ibmvnic_rwi *rwi; struct ibmvnic_rwi *rwi;
...@@ -2252,9 +2241,9 @@ static void __ibmvnic_reset(struct work_struct *work) ...@@ -2252,9 +2241,9 @@ static void __ibmvnic_reset(struct work_struct *work)
else else
adapter->state = reset_state; adapter->state = reset_state;
rc = 0; rc = 0;
} else if (rc && rc != IBMVNIC_INIT_FAILED && }
!adapter->force_reset_recovery) if (rc)
break; netdev_dbg(adapter->netdev, "Reset failed, rc=%d\n", rc);
rwi = get_next_rwi(adapter); rwi = get_next_rwi(adapter);
...@@ -2268,11 +2257,6 @@ static void __ibmvnic_reset(struct work_struct *work) ...@@ -2268,11 +2257,6 @@ static void __ibmvnic_reset(struct work_struct *work)
complete(&adapter->reset_done); complete(&adapter->reset_done);
} }
if (rc) {
netdev_dbg(adapter->netdev, "Reset failed\n");
free_all_rwi(adapter);
}
clear_bit_unlock(0, &adapter->resetting); clear_bit_unlock(0, &adapter->resetting);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment