From c80ef5b408a7b7fcdcf6ff03a5476d873bb2ae09 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 13 Jan 2010 10:59:13 +0000 Subject: [PATCH] --- yaml --- r: 179260 b: refs/heads/master c: f3766c26a5d00189e5c0965c66f01956d15a92d6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/sfc/selftest.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 29de3fe0f638..a58783bdfdf2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 55029c1d65158aea9672c5dfadb43a57f23e3100 +refs/heads/master: f3766c26a5d00189e5c0965c66f01956d15a92d6 diff --git a/trunk/drivers/net/sfc/selftest.c b/trunk/drivers/net/sfc/selftest.c index af3933579790..250c8827b842 100644 --- a/trunk/drivers/net/sfc/selftest.c +++ b/trunk/drivers/net/sfc/selftest.c @@ -79,10 +79,14 @@ struct efx_loopback_state { static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) { int rc = 0; - int devad = __ffs(efx->mdio.mmds); + int devad; u16 physid1, physid2; - if (efx->phy_type == PHY_TYPE_NONE) + if (efx->mdio.mode_support & MDIO_SUPPORTS_C45) + devad = __ffs(efx->mdio.mmds); + else if (efx->mdio.mode_support & MDIO_SUPPORTS_C22) + devad = MDIO_DEVAD_NONE; + else return 0; mutex_lock(&efx->mac_lock);