aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2010-12-02 08:48:14 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-03 12:08:10 -0500
commit4f3907e9a600a46d8c946469ce6636080310d12e (patch)
tree8535731120501ac74da30bae089533146e02eedc /drivers/net/sfc
parent78d4189d6b000898db2d9a9d745468f1322cbc71 (diff)
sfc: When waking a stopped tx_queue, only lock that tx_queue
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/tx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 11726989fe2d..03194f7c0954 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -401,6 +401,7 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
401{ 401{
402 unsigned fill_level; 402 unsigned fill_level;
403 struct efx_nic *efx = tx_queue->efx; 403 struct efx_nic *efx = tx_queue->efx;
404 struct netdev_queue *queue;
404 405
405 EFX_BUG_ON_PARANOID(index > tx_queue->ptr_mask); 406 EFX_BUG_ON_PARANOID(index > tx_queue->ptr_mask);
406 407
@@ -417,12 +418,15 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
417 418
418 /* Do this under netif_tx_lock(), to avoid racing 419 /* Do this under netif_tx_lock(), to avoid racing
419 * with efx_xmit(). */ 420 * with efx_xmit(). */
420 netif_tx_lock(efx->net_dev); 421 queue = netdev_get_tx_queue(
422 efx->net_dev,
423 tx_queue->queue / EFX_TXQ_TYPES);
424 __netif_tx_lock(queue, smp_processor_id());
421 if (tx_queue->stopped) { 425 if (tx_queue->stopped) {
422 tx_queue->stopped = 0; 426 tx_queue->stopped = 0;
423 efx_wake_queue(tx_queue->channel); 427 efx_wake_queue(tx_queue->channel);
424 } 428 }
425 netif_tx_unlock(efx->net_dev); 429 __netif_tx_unlock(queue);
426 } 430 }
427 } 431 }
428} 432}