aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-05-27 11:52:54 -0400
committerBen Hutchings <bhutchings@solarflare.com>2013-08-21 14:49:23 -0400
commite42c3d85af629697699c89aecba481527a1da898 (patch)
tree7431ccaddc601beb668969d26cb1d07f6d72a264 /drivers/net/ethernet/sfc/net_driver.h
parent501a248cf6995286a4da0c2aa93c0fa9c5941453 (diff)
sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour
Currently efx_stop_datapath() will try to flush our DMA queues (if DMA is enabled), then finalise software and hardware state for each queue. However, for EF10 we must ask the MC to finalise each queue, which implicitly starts flushing it, and then wait for the flush events. We therefore need to delegate more of this to the NIC type. Combine all the hardware operations into a new NIC-type operation efx_nic_type::fini_dmaq, and call this before tearing down the software state and buffers for all the DMA queues. 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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index c9f798913f39..b382895901b1 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -953,8 +953,11 @@ static inline unsigned int efx_port_num(struct efx_nic *efx)
953 * @probe_port: Probe the MAC and PHY 953 * @probe_port: Probe the MAC and PHY
954 * @remove_port: Free resources allocated by probe_port() 954 * @remove_port: Free resources allocated by probe_port()
955 * @handle_global_event: Handle a "global" event (may be %NULL) 955 * @handle_global_event: Handle a "global" event (may be %NULL)
956 * @fini_dmaq: Flush and finalise DMA queues (RX and TX queues)
956 * @prepare_flush: Prepare the hardware for flushing the DMA queues 957 * @prepare_flush: Prepare the hardware for flushing the DMA queues
957 * @finish_flush: Clean up after flushing the DMA queues 958 * (for Falcon architecture)
959 * @finish_flush: Clean up after flushing the DMA queues (for Falcon
960 * architecture)
958 * @update_stats: Update statistics not provided by event handling 961 * @update_stats: Update statistics not provided by event handling
959 * @start_stats: Start the regular fetching of statistics 962 * @start_stats: Start the regular fetching of statistics
960 * @stop_stats: Stop the regular fetching of statistics 963 * @stop_stats: Stop the regular fetching of statistics
@@ -1014,6 +1017,7 @@ struct efx_nic_type {
1014 int (*probe_port)(struct efx_nic *efx); 1017 int (*probe_port)(struct efx_nic *efx);
1015 void (*remove_port)(struct efx_nic *efx); 1018 void (*remove_port)(struct efx_nic *efx);
1016 bool (*handle_global_event)(struct efx_channel *channel, efx_qword_t *); 1019 bool (*handle_global_event)(struct efx_channel *channel, efx_qword_t *);
1020 int (*fini_dmaq)(struct efx_nic *efx);
1017 void (*prepare_flush)(struct efx_nic *efx); 1021 void (*prepare_flush)(struct efx_nic *efx);
1018 void (*finish_flush)(struct efx_nic *efx); 1022 void (*finish_flush)(struct efx_nic *efx);
1019 void (*update_stats)(struct efx_nic *efx); 1023 void (*update_stats)(struct efx_nic *efx);