diff options
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r-- | drivers/net/sfc/selftest.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index 50ad3bcaf68a..822f6c2a6a7c 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -695,12 +695,12 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, | |||
695 | /* Offline (i.e. disruptive) testing | 695 | /* Offline (i.e. disruptive) testing |
696 | * This checks MAC and PHY loopback on the specified port. */ | 696 | * This checks MAC and PHY loopback on the specified port. */ |
697 | 697 | ||
698 | /* force the carrier state off so the kernel doesn't transmit during | 698 | /* Detach the device so the kernel doesn't transmit during the |
699 | * the loopback test, and the watchdog timeout doesn't fire. Also put | 699 | * loopback test and the watchdog timeout doesn't fire. |
700 | * falcon into loopback for the register test. | ||
701 | */ | 700 | */ |
701 | netif_device_detach(efx->net_dev); | ||
702 | |||
702 | mutex_lock(&efx->mac_lock); | 703 | mutex_lock(&efx->mac_lock); |
703 | efx->port_inhibited = true; | ||
704 | if (efx->loopback_modes) { | 704 | if (efx->loopback_modes) { |
705 | /* We need the 312 clock from the PHY to test the XMAC | 705 | /* We need the 312 clock from the PHY to test the XMAC |
706 | * registers, so move into XGMII loopback if available */ | 706 | * registers, so move into XGMII loopback if available */ |
@@ -750,12 +750,11 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, | |||
750 | /* restore the PHY to the previous state */ | 750 | /* restore the PHY to the previous state */ |
751 | mutex_lock(&efx->mac_lock); | 751 | mutex_lock(&efx->mac_lock); |
752 | efx->phy_mode = phy_mode; | 752 | efx->phy_mode = phy_mode; |
753 | efx->port_inhibited = false; | ||
754 | efx->loopback_mode = loopback_mode; | 753 | efx->loopback_mode = loopback_mode; |
755 | __efx_reconfigure_port(efx); | 754 | __efx_reconfigure_port(efx); |
756 | mutex_unlock(&efx->mac_lock); | 755 | mutex_unlock(&efx->mac_lock); |
757 | 756 | ||
758 | netif_tx_wake_all_queues(efx->net_dev); | 757 | netif_device_attach(efx->net_dev); |
759 | 758 | ||
760 | return rc_test; | 759 | return rc_test; |
761 | } | 760 | } |