diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-02-28 18:37:35 -0500 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-03-06 13:14:15 -0500 |
commit | eee6f6a9e0c83811de77a137989d4a3289e297cc (patch) | |
tree | 88f5a56b976c0c26177eeaf2b0f115e9153b92d1 /drivers/net/ethernet/sfc/nic.h | |
parent | ed74f48087d1b1cf7cf534dad03bf1584eee783d (diff) |
sfc: Encapsulate access to efx_{channel,nic}::last_irq_cpu in self-test
Cleanup in preparation for doing an event test on ifup.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r-- | drivers/net/ethernet/sfc/nic.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index ac12f7f7f35b..e0e8596f4d10 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h | |||
@@ -301,14 +301,23 @@ extern void falcon_update_stats_xmac(struct efx_nic *efx); | |||
301 | /* Interrupts and test events */ | 301 | /* Interrupts and test events */ |
302 | extern int efx_nic_init_interrupt(struct efx_nic *efx); | 302 | extern int efx_nic_init_interrupt(struct efx_nic *efx); |
303 | extern void efx_nic_enable_interrupts(struct efx_nic *efx); | 303 | extern void efx_nic_enable_interrupts(struct efx_nic *efx); |
304 | extern void efx_nic_generate_test_event(struct efx_channel *channel); | 304 | extern void efx_nic_event_test_start(struct efx_channel *channel); |
305 | extern void efx_nic_generate_interrupt(struct efx_nic *efx); | 305 | extern void efx_nic_irq_test_start(struct efx_nic *efx); |
306 | extern void efx_nic_disable_interrupts(struct efx_nic *efx); | 306 | extern void efx_nic_disable_interrupts(struct efx_nic *efx); |
307 | extern void efx_nic_fini_interrupt(struct efx_nic *efx); | 307 | extern void efx_nic_fini_interrupt(struct efx_nic *efx); |
308 | extern irqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx); | 308 | extern irqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx); |
309 | extern irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id); | 309 | extern irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id); |
310 | extern void falcon_irq_ack_a1(struct efx_nic *efx); | 310 | extern void falcon_irq_ack_a1(struct efx_nic *efx); |
311 | 311 | ||
312 | static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel) | ||
313 | { | ||
314 | return ACCESS_ONCE(channel->last_irq_cpu); | ||
315 | } | ||
316 | static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx) | ||
317 | { | ||
318 | return ACCESS_ONCE(efx->last_irq_cpu); | ||
319 | } | ||
320 | |||
312 | /* Global Resources */ | 321 | /* Global Resources */ |
313 | extern int efx_nic_flush_queues(struct efx_nic *efx); | 322 | extern int efx_nic_flush_queues(struct efx_nic *efx); |
314 | extern void falcon_start_nic_stats(struct efx_nic *efx); | 323 | extern void falcon_start_nic_stats(struct efx_nic *efx); |