diff options
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 79894160a9a4..fa98af58223e 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -333,7 +333,10 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx, | |||
333 | unsigned int n = 0; | 333 | unsigned int n = 0; |
334 | enum efx_loopback_mode mode; | 334 | enum efx_loopback_mode mode; |
335 | 335 | ||
336 | /* Interrupt */ | 336 | efx_fill_test(n++, strings, data, &tests->mii, |
337 | "core", 0, "mii", NULL); | ||
338 | efx_fill_test(n++, strings, data, &tests->nvram, | ||
339 | "core", 0, "nvram", NULL); | ||
337 | efx_fill_test(n++, strings, data, &tests->interrupt, | 340 | efx_fill_test(n++, strings, data, &tests->interrupt, |
338 | "core", 0, "interrupt", NULL); | 341 | "core", 0, "interrupt", NULL); |
339 | 342 | ||
@@ -353,16 +356,17 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx, | |||
353 | "eventq.poll", NULL); | 356 | "eventq.poll", NULL); |
354 | } | 357 | } |
355 | 358 | ||
356 | /* PHY presence */ | 359 | efx_fill_test(n++, strings, data, &tests->registers, |
357 | efx_fill_test(n++, strings, data, &tests->phy_ok, | 360 | "core", 0, "registers", NULL); |
358 | EFX_PORT_NAME, "phy_ok", NULL); | 361 | efx_fill_test(n++, strings, data, &tests->phy, |
362 | EFX_PORT_NAME, "phy", NULL); | ||
359 | 363 | ||
360 | /* Loopback tests */ | 364 | /* Loopback tests */ |
361 | efx_fill_test(n++, strings, data, &tests->loopback_speed, | 365 | efx_fill_test(n++, strings, data, &tests->loopback_speed, |
362 | EFX_PORT_NAME, "loopback.speed", NULL); | 366 | EFX_PORT_NAME, "loopback.speed", NULL); |
363 | efx_fill_test(n++, strings, data, &tests->loopback_full_duplex, | 367 | efx_fill_test(n++, strings, data, &tests->loopback_full_duplex, |
364 | EFX_PORT_NAME, "loopback.full_duplex", NULL); | 368 | EFX_PORT_NAME, "loopback.full_duplex", NULL); |
365 | for (mode = LOOPBACK_NONE; mode < LOOPBACK_TEST_MAX; mode++) { | 369 | for (mode = LOOPBACK_NONE; mode <= LOOPBACK_TEST_MAX; mode++) { |
366 | if (!(efx->loopback_modes & (1 << mode))) | 370 | if (!(efx->loopback_modes & (1 << mode))) |
367 | continue; | 371 | continue; |
368 | n = efx_fill_loopback_test(efx, | 372 | n = efx_fill_loopback_test(efx, |
@@ -500,15 +504,9 @@ static void efx_ethtool_self_test(struct net_device *net_dev, | |||
500 | goto out; | 504 | goto out; |
501 | 505 | ||
502 | /* Perform offline tests only if online tests passed */ | 506 | /* Perform offline tests only if online tests passed */ |
503 | if (offline) { | 507 | if (offline) |
504 | /* Stop the kernel from sending packets during the test. */ | ||
505 | efx_stop_queue(efx); | ||
506 | efx_flush_queues(efx); | ||
507 | |||
508 | rc = efx_offline_test(efx, &efx_tests, | 508 | rc = efx_offline_test(efx, &efx_tests, |
509 | efx->loopback_modes); | 509 | efx->loopback_modes); |
510 | efx_wake_queue(efx); | ||
511 | } | ||
512 | 510 | ||
513 | out: | 511 | out: |
514 | if (!already_up) | 512 | if (!already_up) |