aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-01-05 15:14:10 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-01-26 19:10:52 -0500
commit1646a6f352a6f70fcca828589ed04797aa09d494 (patch)
tree7f39f32e75140e831c26dd57caa7c28515252053 /drivers/net/ethernet/sfc/efx.h
parentf70d1847348e9548a9a56e4434946315bca297c8 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.h')
-rw-r--r--drivers/net/ethernet/sfc/efx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
index a3541ac6ea01..e0b66d158d79 100644
--- a/drivers/net/ethernet/sfc/efx.h
+++ b/drivers/net/ethernet/sfc/efx.h
@@ -145,6 +145,12 @@ static inline void efx_schedule_channel(struct efx_channel *channel)
145 napi_schedule(&channel->napi_str); 145 napi_schedule(&channel->napi_str);
146} 146}
147 147
148static inline void efx_schedule_channel_irq(struct efx_channel *channel)
149{
150 channel->last_irq_cpu = raw_smp_processor_id();
151 efx_schedule_channel(channel);
152}
153
148extern void efx_link_status_changed(struct efx_nic *efx); 154extern void efx_link_status_changed(struct efx_nic *efx);
149extern void efx_link_set_advertising(struct efx_nic *efx, u32); 155extern void efx_link_set_advertising(struct efx_nic *efx, u32);
150extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); 156extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8);