aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx_common.c
diff options
context:
space:
mode:
authorAlex Maftei (amaftei) <amaftei@solarflare.com>2020-01-08 16:12:34 +0000
committerDavid S. Miller <davem@davemloft.net>2020-01-08 13:28:03 -0800
commite20ba5b1d13fbe558cf1f654eaef347f17a36f7a (patch)
tree2dbd21201b1903bfd204912fef60cf86555423f9 /drivers/net/ethernet/sfc/efx_common.c
parentsfc: move some channel-related code (diff)
downloadlinux-e20ba5b1d13fbe558cf1f654eaef347f17a36f7a.tar.xz
linux-e20ba5b1d13fbe558cf1f654eaef347f17a36f7a.zip
sfc: move channel start/stop code
Also includes interrupt enabling/disabling code. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx_common.c')
-rw-r--r--drivers/net/ethernet/sfc/efx_common.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index f1c487de3f04..d0fc51a108bf 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -238,30 +238,6 @@ void efx_start_monitor(struct efx_nic *efx)
*
*************************************************************************/
-void efx_start_channels(struct efx_nic *efx)
-{
- struct efx_tx_queue *tx_queue;
- struct efx_rx_queue *rx_queue;
- struct efx_channel *channel;
-
- efx_for_each_channel(channel, efx) {
- efx_for_each_channel_tx_queue(tx_queue, channel) {
- efx_init_tx_queue(tx_queue);
- atomic_inc(&efx->active_queues);
- }
-
- efx_for_each_channel_rx_queue(rx_queue, channel) {
- efx_init_rx_queue(rx_queue);
- atomic_inc(&efx->active_queues);
- efx_stop_eventq(channel);
- efx_fast_push_rx_descriptors(rx_queue, false);
- efx_start_eventq(channel);
- }
-
- WARN_ON(channel->rx_pkt_n_frags);
- }
-}
-
/* Channels are shutdown and reinitialised whilst the NIC is running
* to propagate configuration changes (mtu, checksum offload), or
* to clear hardware error conditions
@@ -342,51 +318,6 @@ static void efx_start_datapath(struct efx_nic *efx)
netif_tx_wake_all_queues(efx->net_dev);
}
-void efx_stop_channels(struct efx_nic *efx)
-{
- struct efx_tx_queue *tx_queue;
- struct efx_rx_queue *rx_queue;
- struct efx_channel *channel;
- int rc = 0;
-
- /* Stop RX refill */
- efx_for_each_channel(channel, efx) {
- efx_for_each_channel_rx_queue(rx_queue, channel)
- rx_queue->refill_enabled = false;
- }
-
- efx_for_each_channel(channel, efx) {
- /* RX packet processing is pipelined, so wait for the
- * NAPI handler to complete. At least event queue 0
- * might be kept active by non-data events, so don't
- * use napi_synchronize() but actually disable NAPI
- * temporarily.
- */
- if (efx_channel_has_rx_queue(channel)) {
- efx_stop_eventq(channel);
- efx_start_eventq(channel);
- }
- }
-
- if (efx->type->fini_dmaq)
- rc = efx->type->fini_dmaq(efx);
-
- if (rc) {
- netif_err(efx, drv, efx->net_dev, "failed to flush queues\n");
- } else {
- netif_dbg(efx, drv, efx->net_dev,
- "successfully flushed all queues\n");
- }
-
- efx_for_each_channel(channel, efx) {
- efx_for_each_channel_rx_queue(rx_queue, channel)
- efx_fini_rx_queue(rx_queue);
- efx_for_each_possible_channel_tx_queue(tx_queue, channel)
- efx_fini_tx_queue(tx_queue);
- }
- efx->xdp_rxq_info_failed = false;
-}
-
static void efx_stop_datapath(struct efx_nic *efx)
{
EFX_ASSERT_RESET_SERIALISED(efx);