diff options
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r-- | drivers/net/sfc/selftest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index 578b7f410ed..6bb09f263b3 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -702,8 +702,15 @@ int efx_offline_test(struct efx_nic *efx, | |||
702 | */ | 702 | */ |
703 | mutex_lock(&efx->mac_lock); | 703 | mutex_lock(&efx->mac_lock); |
704 | efx->port_inhibited = true; | 704 | efx->port_inhibited = true; |
705 | if (efx->loopback_modes) | 705 | if (efx->loopback_modes) { |
706 | efx->loopback_mode = __ffs(efx->loopback_modes); | 706 | /* We need the 312 clock from the PHY to test the XMAC |
707 | * registers, so move into XGMII loopback if available */ | ||
708 | if (efx->loopback_modes & (1 << LOOPBACK_XGMII)) | ||
709 | efx->loopback_mode = LOOPBACK_XGMII; | ||
710 | else | ||
711 | efx->loopback_mode = __ffs(efx->loopback_modes); | ||
712 | } | ||
713 | |||
707 | __efx_reconfigure_port(efx); | 714 | __efx_reconfigure_port(efx); |
708 | mutex_unlock(&efx->mac_lock); | 715 | mutex_unlock(&efx->mac_lock); |
709 | 716 | ||