Commit 3c78708f authored by Ben Hutchings's avatar Ben Hutchings Committed by Jeff Garzik

sfc: Remove the STATE_RESETTING flag

This was originally a kludge to fix broken locking, which has since
been fixed properly.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 8c8661e4
...@@ -140,8 +140,7 @@ static void efx_fini_channels(struct efx_nic *efx); ...@@ -140,8 +140,7 @@ static void efx_fini_channels(struct efx_nic *efx);
#define EFX_ASSERT_RESET_SERIALISED(efx) \ #define EFX_ASSERT_RESET_SERIALISED(efx) \
do { \ do { \
if ((efx->state == STATE_RUNNING) || \ if (efx->state == STATE_RUNNING) \
(efx->state == STATE_RESETTING)) \
ASSERT_RTNL(); \ ASSERT_RTNL(); \
} while (0) } while (0)
...@@ -1615,7 +1614,6 @@ static int efx_reset(struct efx_nic *efx) ...@@ -1615,7 +1614,6 @@ static int efx_reset(struct efx_nic *efx)
goto unlock_rtnl; goto unlock_rtnl;
} }
efx->state = STATE_RESETTING;
EFX_INFO(efx, "resetting (%d)\n", method); EFX_INFO(efx, "resetting (%d)\n", method);
efx_reset_down(efx, &ecmd); efx_reset_down(efx, &ecmd);
...@@ -1646,7 +1644,6 @@ static int efx_reset(struct efx_nic *efx) ...@@ -1646,7 +1644,6 @@ static int efx_reset(struct efx_nic *efx)
goto disable; goto disable;
EFX_LOG(efx, "reset complete\n"); EFX_LOG(efx, "reset complete\n");
efx->state = STATE_RUNNING;
unlock_rtnl: unlock_rtnl:
rtnl_unlock(); rtnl_unlock();
return 0; return 0;
......
...@@ -459,8 +459,7 @@ enum nic_state { ...@@ -459,8 +459,7 @@ enum nic_state {
STATE_INIT = 0, STATE_INIT = 0,
STATE_RUNNING = 1, STATE_RUNNING = 1,
STATE_FINI = 2, STATE_FINI = 2,
STATE_RESETTING = 3, /* rtnl_lock always held */ STATE_DISABLED = 3,
STATE_DISABLED = 4,
STATE_MAX, STATE_MAX,
}; };
......
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