aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/ethtool.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-29 10:08:55 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-29 20:23:53 -0500
commitc1c4f453b61463df4df16f7aa5782fc0cfe05b9e (patch)
treea72b533294500e7f19ab1f67142b732471df53cb /drivers/net/sfc/ethtool.c
parente58f69f4082f60076885798fae8f3a17ea713bf6 (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/ethtool.c')
-rw-r--r--drivers/net/sfc/ethtool.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index e86cbca75ea8..4fe874052e3e 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -365,9 +365,21 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
365 efx_fill_test(n++, strings, data, &tests->registers, 365 efx_fill_test(n++, strings, data, &tests->registers,
366 "core", 0, "registers", NULL); 366 "core", 0, "registers", NULL);
367 367
368 for (i = 0; i < efx->phy_op->num_tests; i++) 368 if (efx->phy_op->run_tests != NULL) {
369 efx_fill_test(n++, strings, data, &tests->phy[i], 369 EFX_BUG_ON_PARANOID(efx->phy_op->test_name == NULL);
370 "phy", 0, efx->phy_op->test_names[i], NULL); 370
371 for (i = 0; true; ++i) {
372 const char *name;
373
374 EFX_BUG_ON_PARANOID(i >= EFX_MAX_PHY_TESTS);
375 name = efx->phy_op->test_name(efx, i);
376 if (name == NULL)
377 break;
378
379 efx_fill_test(n++, strings, data, &tests->phy[i],
380 "phy", 0, name, NULL);
381 }
382 }
371 383
372 /* Loopback tests */ 384 /* Loopback tests */
373 for (mode = LOOPBACK_NONE; mode <= LOOPBACK_TEST_MAX; mode++) { 385 for (mode = LOOPBACK_NONE; mode <= LOOPBACK_TEST_MAX; mode++) {