sfc: Remove the STATE_RESETTING flag
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 1 Sep 2008 11:49:08 +0000 (12:49 +0100)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 3 Sep 2008 13:53:49 +0000 (09:53 -0400)
This was originally a kludge to fix broken locking, which has since
been fixed properly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/sfc/efx.c
drivers/net/sfc/net_driver.h

index e1e2f806056357f77b6489441d168fd73a6c29f3..d5930863691ce7e21558cdf87ae08aae1cc13d3b 100644 (file)
@@ -140,8 +140,7 @@ static void efx_fini_channels(struct efx_nic *efx);
 
 #define EFX_ASSERT_RESET_SERIALISED(efx)               \
        do {                                            \
-               if ((efx->state == STATE_RUNNING) ||    \
-                   (efx->state == STATE_RESETTING))    \
+               if (efx->state == STATE_RUNNING)        \
                        ASSERT_RTNL();                  \
        } while (0)
 
@@ -1615,7 +1614,6 @@ static int efx_reset(struct efx_nic *efx)
                goto unlock_rtnl;
        }
 
-       efx->state = STATE_RESETTING;
        EFX_INFO(efx, "resetting (%d)\n", method);
 
        efx_reset_down(efx, &ecmd);
@@ -1646,7 +1644,6 @@ static int efx_reset(struct efx_nic *efx)
                goto disable;
 
        EFX_LOG(efx, "reset complete\n");
-       efx->state = STATE_RUNNING;
  unlock_rtnl:
        rtnl_unlock();
        return 0;
index 531d939b574ff6bd24950a06b1ed530501f1928e..567df00090fbdc465c3541eb7375dae85501fe8a 100644 (file)
@@ -459,8 +459,7 @@ enum nic_state {
        STATE_INIT = 0,
        STATE_RUNNING = 1,
        STATE_FINI = 2,
-       STATE_RESETTING = 3, /* rtnl_lock always held */
-       STATE_DISABLED = 4,
+       STATE_DISABLED = 3,
        STATE_MAX,
 };