summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Hodgson2010-12-02 14:48:14 +0100
committerDavid S. Miller2010-12-03 18:08:10 +0100
commit4f3907e9a600a46d8c946469ce6636080310d12e (patch)
tree8535731120501ac74da30bae089533146e02eedc
parentsfc: Update kernel-doc to match earlier move of Toeplitz hash key (diff)
downloadkernel-qcow2-linux-4f3907e9a600a46d8c946469ce6636080310d12e.tar.gz
kernel-qcow2-linux-4f3907e9a600a46d8c946469ce6636080310d12e.tar.xz
kernel-qcow2-linux-4f3907e9a600a46d8c946469ce6636080310d12e.zip
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>
-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)
{
unsigned fill_level;
struct efx_nic *efx = tx_queue->efx;
+ struct netdev_queue *queue;
EFX_BUG_ON_PARANOID(index > tx_queue->ptr_mask);
@@ -417,12 +418,15 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
/* Do this under netif_tx_lock(), to avoid racing
* with efx_xmit(). */
- netif_tx_lock(efx->net_dev);
+ queue = netdev_get_tx_queue(
+ efx->net_dev,
+ tx_queue->queue / EFX_TXQ_TYPES);
+ __netif_tx_lock(queue, smp_processor_id());
if (tx_queue->stopped) {
tx_queue->stopped = 0;
efx_wake_queue(tx_queue->channel);
}
- netif_tx_unlock(efx->net_dev);
+ __netif_tx_unlock(queue);
}
}
}