diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-12-08 14:51:47 -0500 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-01-26 19:10:50 -0500 |
commit | cc180b69c009ec52f67a56d96b9073b9f774b323 (patch) | |
tree | 2d20225099a9a08d3471aeb3cd8ce4295417e5e6 /drivers/net/ethernet/sfc/net_driver.h | |
parent | 6aa9c7f625e8ce07060467051b68fc068118ee64 (diff) |
sfc: Correct interrupt timer quantum for Siena (normal and turbo mode)
We currently assume that the timer quantum for Siena is 5 us, the same
as for Falcon. This is not correct; timer ticks are generated on a
rota which takes a minimum of 768 cycles (each event delivery or other
timer change will delay it by 3 cycles). The timer quantum should be
6.144 or 3.072 us depending on whether turbo mode is active.
Replace EFX_IRQ_MOD_RESOLUTION with a timer_quantum_ns field in struct
efx_nic, initialised by the efx_nic_type::probe function.
While we're at it, replace EFX_IRQ_MOD_MAX with a timer_period_max
field in struct efx_nic_type.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index 4cbd997e378b..8ce4d068bba5 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h | |||
@@ -624,6 +624,7 @@ struct efx_filter_state; | |||
624 | * @membase_phys: Memory BAR value as physical address | 624 | * @membase_phys: Memory BAR value as physical address |
625 | * @membase: Memory BAR value | 625 | * @membase: Memory BAR value |
626 | * @interrupt_mode: Interrupt mode | 626 | * @interrupt_mode: Interrupt mode |
627 | * @timer_quantum_ns: Interrupt timer quantum, in nanoseconds | ||
627 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues | 628 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues |
628 | * @irq_rx_moderation: IRQ moderation time for RX event queues | 629 | * @irq_rx_moderation: IRQ moderation time for RX event queues |
629 | * @msg_enable: Log message enable flags | 630 | * @msg_enable: Log message enable flags |
@@ -706,6 +707,7 @@ struct efx_nic { | |||
706 | void __iomem *membase; | 707 | void __iomem *membase; |
707 | 708 | ||
708 | enum efx_int_mode interrupt_mode; | 709 | enum efx_int_mode interrupt_mode; |
710 | unsigned int timer_quantum_ns; | ||
709 | bool irq_rx_adaptive; | 711 | bool irq_rx_adaptive; |
710 | unsigned int irq_rx_moderation; | 712 | unsigned int irq_rx_moderation; |
711 | u32 msg_enable; | 713 | u32 msg_enable; |
@@ -845,6 +847,7 @@ static inline unsigned int efx_port_num(struct efx_nic *efx) | |||
845 | * from &enum efx_init_mode. | 847 | * from &enum efx_init_mode. |
846 | * @phys_addr_channels: Number of channels with physically addressed | 848 | * @phys_addr_channels: Number of channels with physically addressed |
847 | * descriptors | 849 | * descriptors |
850 | * @timer_period_max: Maximum period of interrupt timer (in ticks) | ||
848 | * @tx_dc_base: Base address in SRAM of TX queue descriptor caches | 851 | * @tx_dc_base: Base address in SRAM of TX queue descriptor caches |
849 | * @rx_dc_base: Base address in SRAM of RX queue descriptor caches | 852 | * @rx_dc_base: Base address in SRAM of RX queue descriptor caches |
850 | * @offload_features: net_device feature flags for protocol offload | 853 | * @offload_features: net_device feature flags for protocol offload |
@@ -889,6 +892,7 @@ struct efx_nic_type { | |||
889 | unsigned int rx_buffer_padding; | 892 | unsigned int rx_buffer_padding; |
890 | unsigned int max_interrupt_mode; | 893 | unsigned int max_interrupt_mode; |
891 | unsigned int phys_addr_channels; | 894 | unsigned int phys_addr_channels; |
895 | unsigned int timer_period_max; | ||
892 | unsigned int tx_dc_base; | 896 | unsigned int tx_dc_base; |
893 | unsigned int rx_dc_base; | 897 | unsigned int rx_dc_base; |
894 | netdev_features_t offload_features; | 898 | netdev_features_t offload_features; |