diff options
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r-- | drivers/net/sfc/selftest.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index af3933579790..250c8827b842 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -79,10 +79,14 @@ struct efx_loopback_state { | |||
79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) | 79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) |
80 | { | 80 | { |
81 | int rc = 0; | 81 | int rc = 0; |
82 | int devad = __ffs(efx->mdio.mmds); | 82 | int devad; |
83 | u16 physid1, physid2; | 83 | u16 physid1, physid2; |
84 | 84 | ||
85 | if (efx->phy_type == PHY_TYPE_NONE) | 85 | if (efx->mdio.mode_support & MDIO_SUPPORTS_C45) |
86 | devad = __ffs(efx->mdio.mmds); | ||
87 | else if (efx->mdio.mode_support & MDIO_SUPPORTS_C22) | ||
88 | devad = MDIO_DEVAD_NONE; | ||
89 | else | ||
86 | return 0; | 90 | return 0; |
87 | 91 | ||
88 | mutex_lock(&efx->mac_lock); | 92 | mutex_lock(&efx->mac_lock); |