Commit 1ac0226e authored by Ben Hutchings's avatar Ben Hutchings

sfc: Fix loopback self-test with separate_tx_channels=1

The loopback self-test iterates over all the TX queues of channel 0,
which is not very interesting when that's an RX-only channel.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflre.com>
parent 0a6e5008
...@@ -337,7 +337,8 @@ static int efx_fill_loopback_test(struct efx_nic *efx, ...@@ -337,7 +337,8 @@ static int efx_fill_loopback_test(struct efx_nic *efx,
unsigned int test_index, unsigned int test_index,
struct ethtool_string *strings, u64 *data) struct ethtool_string *strings, u64 *data)
{ {
struct efx_channel *channel = efx_get_channel(efx, 0); struct efx_channel *channel =
efx_get_channel(efx, efx->tx_channel_offset);
struct efx_tx_queue *tx_queue; struct efx_tx_queue *tx_queue;
efx_for_each_channel_tx_queue(tx_queue, channel) { efx_for_each_channel_tx_queue(tx_queue, channel) {
......
...@@ -614,7 +614,8 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests, ...@@ -614,7 +614,8 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests,
{ {
enum efx_loopback_mode mode; enum efx_loopback_mode mode;
struct efx_loopback_state *state; struct efx_loopback_state *state;
struct efx_channel *channel = efx_get_channel(efx, 0); struct efx_channel *channel =
efx_get_channel(efx, efx->tx_channel_offset);
struct efx_tx_queue *tx_queue; struct efx_tx_queue *tx_queue;
int rc = 0; int rc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment