diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-29 16:08:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-30 02:23:53 +0100 |
commit | c1c4f453b61463df4df16f7aa5782fc0cfe05b9e (patch) | |
tree | a72b533294500e7f19ab1f67142b732471df53cb /drivers/net/sfc/falcon.c | |
parent | sfc: Extend loopback mode enumeration (diff) | |
download | linux-c1c4f453b61463df4df16f7aa5782fc0cfe05b9e.tar.xz linux-c1c4f453b61463df4df16f7aa5782fc0cfe05b9e.zip |
sfc: Remove static PHY data and enumerations
New NICs have firmware managing the PHY, and we will discover the PHY
capabilities at run-time. Replace the static data with probe() and
test_name() operations.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 63e6734d8341..29d45376e4c9 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -2291,19 +2291,12 @@ static int falcon_probe_port(struct efx_nic *efx) return -ENODEV; } - if (efx->phy_op->macs & EFX_XMAC) - efx->loopback_modes |= ((1 << LOOPBACK_XGMII) | - (1 << LOOPBACK_XGXS) | - (1 << LOOPBACK_XAUI)); - if (efx->phy_op->macs & EFX_GMAC) - efx->loopback_modes |= (1 << LOOPBACK_GMAC); - efx->loopback_modes |= efx->phy_op->loopbacks; - - /* Set up MDIO structure for PHY */ - efx->mdio.mmds = efx->phy_op->mmds; - efx->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; + /* Fill out MDIO structure and loopback modes */ efx->mdio.mdio_read = falcon_mdio_read; efx->mdio.mdio_write = falcon_mdio_write; + rc = efx->phy_op->probe(efx); + if (rc != 0) + return rc; /* Initial assumption */ efx->link_state.speed = 10000; |