]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Remove dependence on NAPI polling in efx_test_eventq_irq()
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 4 Nov 2011 23:06:04 +0000 (23:06 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:51 +0000 (00:10 +0000)
commit6b7d5004efa8fb2ce55c2d74d08698ed7a5e01e0
tree7e764db050defe7bec474e4266c5d3dd45a45766
parent258dcda5dbe53cce13d8c077f27a54204173fa1b
sfc: Remove dependence on NAPI polling in efx_test_eventq_irq()

We cannot safely assume that the NAPI handler will complete within the
20 ms that we allow for the event self-test.  The handler may be
deferred for longer than this, particularly on realtime kernels.

Instead, check whether either an event has been handled or (as in the
old failure path) whether an interrupt has been received and an event
has been delivered but not yet handled.  Use napi_disable() to
synchronize with the NAPI handler before checking, since it will
clear events before updating eventq_read_ptr.

Remove the test result chan.N.eventq.poll, since it is not an error
if the NAPI handler does not run during the test.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/selftest.c
drivers/net/ethernet/sfc/selftest.h