diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-02-29 03:40:21 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-03-06 22:14:15 +0400 |
commit | dd40781e3a4e9d3177a548c389232ee9496dae8e (patch) | |
tree | 6308028fab5fa47ec105eb77888e3cc8a59b4323 /drivers/net/ethernet/sfc/net_driver.h | |
parent | eee6f6a9e0c83811de77a137989d4a3289e297cc (diff) | |
download | linux-dd40781e3a4e9d3177a548c389232ee9496dae8e.tar.xz |
sfc: Run event/IRQ self-test asynchronously when interface is brought up
Generate a test event on each event queue whenever the interface is
brought up, then after 1 second check that we have either handled a
test event or handled another IRQ for each event queue.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r-- | drivers/net/ethernet/sfc/net_driver.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index 0b95505e8968..27fe85fd4ba3 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -325,7 +325,7 @@ enum efx_rx_alloc_method { * @eventq_mask: Event queue pointer mask * @eventq_read_ptr: Event queue read pointer * @last_eventq_read_ptr: Last event queue read pointer value. - * @last_irq_cpu: Last CPU to handle interrupt for this channel + * @event_test_cpu: Last CPU to handle interrupt or test event for this channel * @irq_count: Number of IRQs since last adaptive moderation decision * @irq_mod_score: IRQ moderation score * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors @@ -356,8 +356,8 @@ struct efx_channel { unsigned int eventq_mask; unsigned int eventq_read_ptr; unsigned int last_eventq_read_ptr; + int event_test_cpu; - int last_irq_cpu; unsigned int irq_count; unsigned int irq_mod_score; #ifdef CONFIG_RFS_ACCEL @@ -678,6 +678,7 @@ struct vfdi_status; * @irq_status: Interrupt status buffer * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0 * @irq_level: IRQ level/index for IRQs not triggered by an event queue + * @selftest_work: Work item for asynchronous self-test * @mtd_list: List of MTDs attached to the NIC * @nic_data: Hardware dependent state * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode, @@ -791,6 +792,7 @@ struct efx_nic { struct efx_buffer irq_status; unsigned irq_zero_count; unsigned irq_level; + struct delayed_work selftest_work; #ifdef CONFIG_SFC_MTD struct list_head mtd_list; |