From 2576c0855b92817c3ecef4b897cc188fa4abc565 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 23 Feb 2012 00:45:50 +0000 Subject: [PATCH] --- yaml --- r: 290428 b: refs/heads/master c: 73e0026fb2bee4f2ca85c702040e143ec504eaa6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/ethernet/sfc/net_driver.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ddcd10fac33a..10e30dc88409 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2d0cc56da39d62e141d4a60e3ac96522c52de4b1 +refs/heads/master: 73e0026fb2bee4f2ca85c702040e143ec504eaa6 diff --git a/trunk/drivers/net/ethernet/sfc/net_driver.h b/trunk/drivers/net/ethernet/sfc/net_driver.h index 3fbec458c323..0b95505e8968 100644 --- a/trunk/drivers/net/ethernet/sfc/net_driver.h +++ b/trunk/drivers/net/ethernet/sfc/net_driver.h @@ -1030,9 +1030,12 @@ static inline bool efx_tx_queue_used(struct efx_tx_queue *tx_queue) /* Iterate over all possible TX queues belonging to a channel */ #define efx_for_each_possible_channel_tx_queue(_tx_queue, _channel) \ - for (_tx_queue = (_channel)->tx_queue; \ - _tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES; \ - _tx_queue++) + if (!efx_channel_has_tx_queues(_channel)) \ + ; \ + else \ + for (_tx_queue = (_channel)->tx_queue; \ + _tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES; \ + _tx_queue++) static inline bool efx_channel_has_rx_queue(struct efx_channel *channel) {