Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122625
b: refs/heads/master
c: 11e6696
h: refs/heads/master
i:
  122623: 79e62ae
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Dec 13, 2008
1 parent a3d7b4c commit 46b3c51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b45319382150008ed7cd31b7965392d55fe68967
refs/heads/master: 11e66966277ea8a3353ad2c2773257973553e73a
14 changes: 8 additions & 6 deletions trunk/drivers/net/sfc/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,11 @@ static void efx_fill_test(unsigned int test_index,

/* Fill string, if applicable */
if (strings) {
snprintf(unit_str.name, sizeof(unit_str.name),
unit_format, unit_id);
if (strchr(unit_format, '%'))
snprintf(unit_str.name, sizeof(unit_str.name),
unit_format, unit_id);
else
strcpy(unit_str.name, unit_format);
snprintf(test_str.name, sizeof(test_str.name),
test_format, test_id);
snprintf(strings[test_index].name,
Expand All @@ -284,7 +287,6 @@ static void efx_fill_test(unsigned int test_index,
}
}

#define EFX_PORT_NAME "port%d", 0
#define EFX_CHANNEL_NAME(_channel) "chan%d", _channel->channel
#define EFX_TX_QUEUE_NAME(_tx_queue) "txq%d", _tx_queue->queue
#define EFX_RX_QUEUE_NAME(_rx_queue) "rxq%d", _rx_queue->queue
Expand Down Expand Up @@ -320,11 +322,11 @@ static int efx_fill_loopback_test(struct efx_nic *efx,
}
efx_fill_test(test_index++, strings, data,
&lb_tests->rx_good,
EFX_PORT_NAME,
"rx", 0,
EFX_LOOPBACK_NAME(mode, "rx_good"));
efx_fill_test(test_index++, strings, data,
&lb_tests->rx_bad,
EFX_PORT_NAME,
"rx", 0,
EFX_LOOPBACK_NAME(mode, "rx_bad"));

return test_index;
Expand Down Expand Up @@ -372,7 +374,7 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
efx_fill_test(n++, strings, data, &tests->registers,
"core", 0, "registers", NULL);
efx_fill_test(n++, strings, data, &tests->phy,
EFX_PORT_NAME, "phy", NULL);
"phy", 0, "bist", NULL);

/* Loopback tests */
for (mode = LOOPBACK_NONE; mode <= LOOPBACK_TEST_MAX; mode++) {
Expand Down

0 comments on commit 46b3c51

Please sign in to comment.