summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBert Kenward <bkenward@solarflare.com>2015-10-26 14:23:42 +0000
committerDavid S. Miller <davem@davemloft.net>2015-10-27 19:40:33 -0700
commitc0f9c7e45d374ce6dc369443fa586c2fe228c345 (patch)
treec085878e09c59da0678d3efde12f01597bc8eca8 /drivers/net/ethernet/sfc/efx.c
parent080a270f5adec1ada1357eb66321e7222cc34301 (diff)
downloadlinux-stable-c0f9c7e45d374ce6dc369443fa586c2fe228c345.tar.gz
linux-stable-c0f9c7e45d374ce6dc369443fa586c2fe228c345.tar.bz2
linux-stable-c0f9c7e45d374ce6dc369443fa586c2fe228c345.zip
sfc: replace spinlocks with bit ops for busy poll locking
This patch reduces the overhead of locking for busy poll. Previously the state was protected by a lock, whereas now it's manipulated solely with atomic operations. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 974637d3ae25..6e11ee6173ce 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2062,7 +2062,7 @@ static void efx_init_napi_channel(struct efx_channel *channel)
netif_napi_add(channel->napi_dev, &channel->napi_str,
efx_poll, napi_weight);
napi_hash_add(&channel->napi_str);
- efx_channel_init_lock(channel);
+ efx_channel_busy_poll_init(channel);
}
static void efx_init_napi(struct efx_nic *efx)
@@ -2125,7 +2125,7 @@ static int efx_busy_poll(struct napi_struct *napi)
if (!netif_running(efx->net_dev))
return LL_FLUSH_FAILED;
- if (!efx_channel_lock_poll(channel))
+ if (!efx_channel_try_lock_poll(channel))
return LL_FLUSH_BUSY;
old_rx_packets = channel->rx_queue.rx_packets;