]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Clean up test interrupt handling
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 5 Jan 2012 20:14:10 +0000 (20:14 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:52 +0000 (00:10 +0000)
commitf1ab4814a262ff0fe29c4e477737384150d98b9b
tree7f39f32e75140e831c26dd57caa7c28515252053
parent63ee617964f767b8f539795075cec21547ba3661
sfc: Clean up test interrupt handling

Interrupts are normally generated by the event queues, moderated by
timers.  However, they may also be triggered by detection of a 'fatal'
error condition (e.g. memory parity error) or by the host writing to
certain CSR fields as part of a self-test.

The IRQ level/index used for these on Falcon rev B0 and Siena is set
by the KER_INT_LEVE_SEL field and cached by the driver in
efx_nic::fatal_irq_level.  Since this value is also relevant to
self-tests rename the field to just 'irq_level'.

Avoid unnecessary cache traffic by using a per-channel 'last_irq_cpu'
field and only writing to the per-controller field when the interrupt
matches efx_nic::irq_level.  Remove the volatile qualifier and use
ACCESS_ONCE in the places we read these fields.

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