diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-29 10:08:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-29 20:23:53 -0500 |
commit | c1c4f453b61463df4df16f7aa5782fc0cfe05b9e (patch) | |
tree | a72b533294500e7f19ab1f67142b732471df53cb /drivers/net/sfc/qt202x_phy.c | |
parent | e58f69f4082f60076885798fae8f3a17ea713bf6 (diff) |
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/qt202x_phy.c')
-rw-r--r-- | drivers/net/sfc/qt202x_phy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index 49a5ab5efb9a..22b0e89ba8f2 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
@@ -135,6 +135,14 @@ static int qt202x_reset_phy(struct efx_nic *efx) | |||
135 | return rc; | 135 | return rc; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int qt202x_phy_probe(struct efx_nic *efx) | ||
139 | { | ||
140 | efx->mdio.mmds = QT202X_REQUIRED_DEVS; | ||
141 | efx->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; | ||
142 | efx->loopback_modes = QT202X_LOOPBACKS | FALCON_XMAC_LOOPBACKS; | ||
143 | return 0; | ||
144 | } | ||
145 | |||
138 | static int qt202x_phy_init(struct efx_nic *efx) | 146 | static int qt202x_phy_init(struct efx_nic *efx) |
139 | { | 147 | { |
140 | struct qt202x_phy_data *phy_data; | 148 | struct qt202x_phy_data *phy_data; |
@@ -224,13 +232,11 @@ static void qt202x_phy_fini(struct efx_nic *efx) | |||
224 | } | 232 | } |
225 | 233 | ||
226 | struct efx_phy_operations falcon_qt202x_phy_ops = { | 234 | struct efx_phy_operations falcon_qt202x_phy_ops = { |
227 | .macs = EFX_XMAC, | 235 | .probe = qt202x_phy_probe, |
228 | .init = qt202x_phy_init, | 236 | .init = qt202x_phy_init, |
229 | .reconfigure = qt202x_phy_reconfigure, | 237 | .reconfigure = qt202x_phy_reconfigure, |
230 | .poll = qt202x_phy_poll, | 238 | .poll = qt202x_phy_poll, |
231 | .fini = qt202x_phy_fini, | 239 | .fini = qt202x_phy_fini, |
232 | .get_settings = qt202x_phy_get_settings, | 240 | .get_settings = qt202x_phy_get_settings, |
233 | .set_settings = efx_mdio_set_settings, | 241 | .set_settings = efx_mdio_set_settings, |
234 | .mmds = QT202X_REQUIRED_DEVS, | ||
235 | .loopbacks = QT202X_LOOPBACKS, | ||
236 | }; | 242 | }; |