diff options
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r-- | drivers/net/sfc/selftest.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index 53fa4edf486c..ff7b84c3fcfb 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -60,12 +60,12 @@ static const char *payload_msg = | |||
60 | * @payload: Payload used in tests | 60 | * @payload: Payload used in tests |
61 | */ | 61 | */ |
62 | struct efx_selftest_state { | 62 | struct efx_selftest_state { |
63 | int flush; | 63 | bool flush; |
64 | int packet_count; | 64 | int packet_count; |
65 | struct sk_buff **skbs; | 65 | struct sk_buff **skbs; |
66 | 66 | ||
67 | /* Checksums are being offloaded */ | 67 | /* Checksums are being offloaded */ |
68 | int offload_csum; | 68 | bool offload_csum; |
69 | 69 | ||
70 | atomic_t rx_good; | 70 | atomic_t rx_good; |
71 | atomic_t rx_bad; | 71 | atomic_t rx_bad; |
@@ -537,7 +537,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue, | |||
537 | state->packet_count, GFP_KERNEL); | 537 | state->packet_count, GFP_KERNEL); |
538 | if (!state->skbs) | 538 | if (!state->skbs) |
539 | return -ENOMEM; | 539 | return -ENOMEM; |
540 | state->flush = 0; | 540 | state->flush = false; |
541 | 541 | ||
542 | EFX_LOG(efx, "TX queue %d testing %s loopback with %d " | 542 | EFX_LOG(efx, "TX queue %d testing %s loopback with %d " |
543 | "packets\n", tx_queue->queue, LOOPBACK_MODE(efx), | 543 | "packets\n", tx_queue->queue, LOOPBACK_MODE(efx), |
@@ -580,7 +580,8 @@ static int efx_test_loopbacks(struct efx_nic *efx, | |||
580 | struct ethtool_cmd ecmd, ecmd_loopback; | 580 | struct ethtool_cmd ecmd, ecmd_loopback; |
581 | struct efx_tx_queue *tx_queue; | 581 | struct efx_tx_queue *tx_queue; |
582 | enum efx_loopback_mode old_mode, mode; | 582 | enum efx_loopback_mode old_mode, mode; |
583 | int count, rc, link_up; | 583 | bool link_up; |
584 | int count, rc; | ||
584 | 585 | ||
585 | rc = efx_ethtool_get_settings(efx->net_dev, &ecmd); | 586 | rc = efx_ethtool_get_settings(efx->net_dev, &ecmd); |
586 | if (rc) { | 587 | if (rc) { |
@@ -611,7 +612,7 @@ static int efx_test_loopbacks(struct efx_nic *efx, | |||
611 | continue; | 612 | continue; |
612 | 613 | ||
613 | /* Move the port into the specified loopback mode. */ | 614 | /* Move the port into the specified loopback mode. */ |
614 | state->flush = 1; | 615 | state->flush = true; |
615 | efx->loopback_mode = mode; | 616 | efx->loopback_mode = mode; |
616 | efx_reconfigure_port(efx); | 617 | efx_reconfigure_port(efx); |
617 | 618 | ||
@@ -664,7 +665,7 @@ static int efx_test_loopbacks(struct efx_nic *efx, | |||
664 | 665 | ||
665 | out: | 666 | out: |
666 | /* Take out of loopback and restore PHY settings */ | 667 | /* Take out of loopback and restore PHY settings */ |
667 | state->flush = 1; | 668 | state->flush = true; |
668 | efx->loopback_mode = old_mode; | 669 | efx->loopback_mode = old_mode; |
669 | efx_ethtool_set_settings(efx->net_dev, &ecmd); | 670 | efx_ethtool_set_settings(efx->net_dev, &ecmd); |
670 | 671 | ||
@@ -716,7 +717,7 @@ int efx_offline_test(struct efx_nic *efx, | |||
716 | * all received packets will be dropped. Mark the state as | 717 | * all received packets will be dropped. Mark the state as |
717 | * "flushing" so all inflight packets are dropped */ | 718 | * "flushing" so all inflight packets are dropped */ |
718 | BUG_ON(efx->loopback_selftest); | 719 | BUG_ON(efx->loopback_selftest); |
719 | state->flush = 1; | 720 | state->flush = true; |
720 | efx->loopback_selftest = state; | 721 | efx->loopback_selftest = state; |
721 | 722 | ||
722 | rc = efx_test_loopbacks(efx, tests, loopback_modes); | 723 | rc = efx_test_loopbacks(efx, tests, loopback_modes); |