Commit f49a4589 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Always close net device at the end of a disabling reset

This fixes a regression introduced by commit
eb9f6744 "sfc: Implement ethtool
reset operation".
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aabc5649
...@@ -1861,6 +1861,7 @@ out: ...@@ -1861,6 +1861,7 @@ out:
} }
if (disabled) { if (disabled) {
dev_close(efx->net_dev);
EFX_ERR(efx, "has been disabled\n"); EFX_ERR(efx, "has been disabled\n");
efx->state = STATE_DISABLED; efx->state = STATE_DISABLED;
} else { } else {
...@@ -1884,8 +1885,7 @@ static void efx_reset_work(struct work_struct *data) ...@@ -1884,8 +1885,7 @@ static void efx_reset_work(struct work_struct *data)
} }
rtnl_lock(); rtnl_lock();
if (efx_reset(efx, efx->reset_pending)) (void)efx_reset(efx, efx->reset_pending);
dev_close(efx->net_dev);
rtnl_unlock(); rtnl_unlock();
} }
......
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