diff options
author | Alexandre Rames <arames@solarflare.com> | 2014-07-22 14:03:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-22 19:55:20 -0700 |
commit | 36763266bbe8a2e93a7639b99bac2fee2c42bc5b (patch) | |
tree | 5fdf487376e5f0f8dedb6fa395eb7c150e00b789 /drivers/net/ethernet/sfc/selftest.c | |
parent | 2dbe82d0d11836279703dcf2679e711e18c23eec (diff) | |
download | op-kernel-dev-36763266bbe8a2e93a7639b99bac2fee2c42bc5b.zip op-kernel-dev-36763266bbe8a2e93a7639b99bac2fee2c42bc5b.tar.gz |
sfc: Add support for busy polling
This patch adds the sfc driver code for implementing busy polling.
It adds ndo_busy_poll method and locking between it and napi poll.
It also adds each napi to the napi_hash right after netif_napi_add().
Uses efx_start_eventq and efx_stop_eventq in the self tests.
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/selftest.c')
-rw-r--r-- | drivers/net/ethernet/sfc/selftest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index 0fc5bae..10b6173 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -188,7 +188,7 @@ static int efx_test_eventq_irq(struct efx_nic *efx, schedule_timeout_uninterruptible(wait); efx_for_each_channel(channel, efx) { - napi_disable(&channel->napi_str); + efx_stop_eventq(channel); if (channel->eventq_read_ptr != read_ptr[channel->channel]) { set_bit(channel->channel, &napi_ran); @@ -200,8 +200,7 @@ static int efx_test_eventq_irq(struct efx_nic *efx, if (efx_nic_event_test_irq_cpu(channel) >= 0) clear_bit(channel->channel, &int_pend); } - napi_enable(&channel->napi_str); - efx_nic_eventq_read_ack(channel); + efx_start_eventq(channel); } wait *= 2; |