Skip to content

Commit

Permalink
sfc: Always close net device at the end of a disabling reset
Browse files Browse the repository at this point in the history
This fixes a regression introduced by commit
eb9f674 "sfc: Implement ethtool
reset operation".

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Apr 28, 2010
1 parent aabc564 commit f49a458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,7 @@ int efx_reset(struct efx_nic *efx, enum reset_type method)
}

if (disabled) {
dev_close(efx->net_dev);
EFX_ERR(efx, "has been disabled\n");
efx->state = STATE_DISABLED;
} else {
Expand All @@ -1884,8 +1885,7 @@ static void efx_reset_work(struct work_struct *data)
}

rtnl_lock();
if (efx_reset(efx, efx->reset_pending))
dev_close(efx->net_dev);
(void)efx_reset(efx, efx->reset_pending);
rtnl_unlock();
}

Expand Down

0 comments on commit f49a458

Please sign in to comment.