aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-25 11:11:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-26 18:59:36 -0500
commit55edc6e6ff728681ebc10d418222740705376664 (patch)
tree66136e674adde15b9668f13d4e0486482b7f1851 /drivers/net/sfc/falcon.h
parent1dfc5ceacd00365a9089e98643f4b26253d5a6aa (diff)
sfc: Split MAC stats DMA initiation and completion
From: Steve Hodgson <shodgson@solarflare.com> Currently we initiate MAC stats DMA and busy-wait for completion when stats are requested. We can improve on this with a periodic timer to initiate and poll for stats, and opportunistically poll when stats are requested. Since efx_nic::stats_disable_count and efx_stats_{disable,enable}() are Falcon-specific, rename them and move them accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.h')
-rw-r--r--drivers/net/sfc/falcon.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/sfc/falcon.h b/drivers/net/sfc/falcon.h
index b331889ca46c..61fab0a00cc3 100644
--- a/drivers/net/sfc/falcon.h
+++ b/drivers/net/sfc/falcon.h
@@ -75,10 +75,18 @@ struct falcon_board {
75 * struct falcon_nic_data - Falcon NIC state 75 * struct falcon_nic_data - Falcon NIC state
76 * @pci_dev2: Secondary function of Falcon A 76 * @pci_dev2: Secondary function of Falcon A
77 * @board: Board state and functions 77 * @board: Board state and functions
78 * @stats_disable_count: Nest count for disabling statistics fetches
79 * @stats_pending: Is there a pending DMA of MAC statistics.
80 * @stats_timer: A timer for regularly fetching MAC statistics.
81 * @stats_dma_done: Pointer to the flag which indicates DMA completion.
78 */ 82 */
79struct falcon_nic_data { 83struct falcon_nic_data {
80 struct pci_dev *pci_dev2; 84 struct pci_dev *pci_dev2;
81 struct falcon_board board; 85 struct falcon_board board;
86 unsigned int stats_disable_count;
87 bool stats_pending;
88 struct timer_list stats_timer;
89 u32 *stats_dma_done;
82}; 90};
83 91
84static inline struct falcon_board *falcon_board(struct efx_nic *efx) 92static inline struct falcon_board *falcon_board(struct efx_nic *efx)
@@ -128,8 +136,6 @@ extern void falcon_remove_port(struct efx_nic *efx);
128/* MAC/PHY */ 136/* MAC/PHY */
129extern int falcon_switch_mac(struct efx_nic *efx); 137extern int falcon_switch_mac(struct efx_nic *efx);
130extern bool falcon_xaui_link_ok(struct efx_nic *efx); 138extern bool falcon_xaui_link_ok(struct efx_nic *efx);
131extern int falcon_dma_stats(struct efx_nic *efx,
132 unsigned int done_offset);
133extern void falcon_drain_tx_fifo(struct efx_nic *efx); 139extern void falcon_drain_tx_fifo(struct efx_nic *efx);
134extern void falcon_deconfigure_mac_wrapper(struct efx_nic *efx); 140extern void falcon_deconfigure_mac_wrapper(struct efx_nic *efx);
135extern void falcon_reconfigure_mac_wrapper(struct efx_nic *efx); 141extern void falcon_reconfigure_mac_wrapper(struct efx_nic *efx);
@@ -154,6 +160,8 @@ extern int falcon_flush_queues(struct efx_nic *efx);
154extern int falcon_reset_hw(struct efx_nic *efx, enum reset_type method); 160extern int falcon_reset_hw(struct efx_nic *efx, enum reset_type method);
155extern void falcon_remove_nic(struct efx_nic *efx); 161extern void falcon_remove_nic(struct efx_nic *efx);
156extern void falcon_update_nic_stats(struct efx_nic *efx); 162extern void falcon_update_nic_stats(struct efx_nic *efx);
163extern void falcon_start_nic_stats(struct efx_nic *efx);
164extern void falcon_stop_nic_stats(struct efx_nic *efx);
157extern void falcon_set_multicast_hash(struct efx_nic *efx); 165extern void falcon_set_multicast_hash(struct efx_nic *efx);
158extern int falcon_reset_xaui(struct efx_nic *efx); 166extern int falcon_reset_xaui(struct efx_nic *efx);
159 167