linux/drivers/net/sfc
Ben Hutchings d4fabcc8e8 sfc: Do not use efx_process_channel_now() in online self-test
During self-tests we use efx_process_channel_now() to handle
completion and other events synchronously.  This disables interrupts
and NAPI processing for the channel in question, but it may still be
interrupted by another channel.  A single socket may receive packets
from multiple net devices or even multiple channels of the same net
device, so this can result in deadlock on a socket lock.

Receiving packets in process context will also result in incorrect
classification by the network cgroup classifier.

Therefore, we must only use efx_process_channel_now() in the offline
loopback tests (which never deliver packets up the stack) and not for
the online interrupt and event tests.

For the interrupt test, there is no reason to process events.  We
only care that an interrupt is raised.

For the event test, we want to know whether events have been received,
and there may be many events ahead of the one we inject.  Therefore
remove efx_channel::magic_count and instead test whether
efx_channel::eventq_read_ptr advances.  This is currently an event
queue index and might wrap around to exactly the same value, resulting
in a false negative.  Therefore move the masking to efx_event() and
efx_nic_eventq_read_ack() so that it cannot wrap within the time of
the test.

The event test also tries to diagnose failures by checking whether an
event was delivered without causing an interrupt.  Add and use a
helper function that only does this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-04-12 16:37:54 +01:00
..
bitfield.h
efx.c sfc: Do not use efx_process_channel_now() in online self-test 2011-04-12 16:37:54 +01:00
efx.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
enum.h
ethtool.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-03-03 21:27:42 -08:00
falcon_boards.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
falcon_xmac.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
falcon.c Fix common misspellings 2011-03-31 11:26:23 -03:00
filter.c sfc: Implement hardware acceleration of RFS 2011-02-17 21:00:33 +00:00
filter.h sfc: Generalise filter spec initialisation 2010-12-07 19:11:26 +00:00
io.h sfc: Use write-combining to reduce TX latency 2011-03-04 17:58:42 +00:00
Kconfig
mac.h sfc: make functions static 2010-10-21 03:09:43 -07:00
Makefile sfc: Add support for SFE4003 board and TXC43128 PHY 2010-09-22 13:26:45 -07:00
mcdi_mac.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
mcdi_pcol.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mcdi_phy.c Fix common misspellings 2011-03-31 11:26:23 -03:00
mcdi.c Fix common misspellings 2011-03-31 11:26:23 -03:00
mcdi.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
mdio_10g.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
mdio_10g.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
mtd.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
net_driver.h sfc: Do not use efx_process_channel_now() in online self-test 2011-04-12 16:37:54 +01:00
nic.c sfc: Do not use efx_process_channel_now() in online self-test 2011-04-12 16:37:54 +01:00
nic.h sfc: Do not use efx_process_channel_now() in online self-test 2011-04-12 16:37:54 +01:00
phy.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
qt202x_phy.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
regs.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
rx.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
selftest.c sfc: Do not use efx_process_channel_now() in online self-test 2011-04-12 16:37:54 +01:00
selftest.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
siena.c sfc: Remove configurable FIFO thresholds for pause frame generation 2011-02-28 23:57:24 +00:00
spi.h sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
tenxpress.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
tx.c sfc: Stop the TX queues during loopback self-tests 2011-04-12 16:20:25 +01:00
txc43128_phy.c sfc: Update copyright dates 2011-02-28 23:57:24 +00:00
workarounds.h sfc: Siena: Disable write-combining when SR-IOV is enabled 2011-03-23 01:35:15 +00:00