liquidio: Moved common function txqs_wake to octeon_network.h
authorIntiyaz Basha <intiyaz.basha@cavium.com>
Sat, 24 Mar 2018 00:36:58 +0000 (17:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Mar 2018 20:18:52 +0000 (16:18 -0400)
Moving common function txqs_wake to octeon_network.h

Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com>
Acked-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
drivers/net/ethernet/cavium/liquidio/octeon_network.h

index 205a298db01038c9deee99d331945b5c50600d68..8a809b4f662674fb4423776d46c92006edf4067c 100644 (file)
@@ -529,34 +529,6 @@ static inline void txqs_start(struct net_device *netdev)
        }
 }
 
-/**
- * \brief Wake Tx queues
- * @param netdev network device
- */
-static inline void txqs_wake(struct net_device *netdev)
-{
-       struct lio *lio = GET_LIO(netdev);
-
-       if (netif_is_multiqueue(netdev)) {
-               int i;
-
-               for (i = 0; i < netdev->num_tx_queues; i++) {
-                       int qno = lio->linfo.txpciq[i %
-                               lio->oct_dev->num_iqs].s.q_no;
-
-                       if (__netif_subqueue_stopped(netdev, i)) {
-                               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
-                                                         tx_restart, 1);
-                               netif_wake_subqueue(netdev, i);
-                       }
-               }
-       } else {
-               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
-                                         tx_restart, 1);
-               netif_wake_queue(netdev);
-       }
-}
-
 /**
  * \brief Stop Tx queue
  * @param netdev network device
index 2e3144661464f0c3961bee57b64ce1c61d583b2c..60743c37b4e47d7fdecf3ff4d1bb2a44cb78d2b2 100644 (file)
@@ -300,33 +300,6 @@ static void txqs_start(struct net_device *netdev)
        }
 }
 
-/**
- * \brief Wake Tx queues
- * @param netdev network device
- */
-static void txqs_wake(struct net_device *netdev)
-{
-       struct lio *lio = GET_LIO(netdev);
-
-       if (netif_is_multiqueue(netdev)) {
-               int i;
-
-               for (i = 0; i < netdev->num_tx_queues; i++) {
-                       int qno = lio->linfo.txpciq[i % lio->oct_dev->num_iqs]
-                                     .s.q_no;
-                       if (__netif_subqueue_stopped(netdev, i)) {
-                               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
-                                                         tx_restart, 1);
-                               netif_wake_subqueue(netdev, i);
-                       }
-               }
-       } else {
-               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
-                                         tx_restart, 1);
-               netif_wake_queue(netdev);
-       }
-}
-
 /**
  * \brief Start Tx queue
  * @param netdev network device
index d8079e35ef6e396a9d500f47ff54edadabb85700..2d2f49b7f563032491869b6c1143e27d82ec7a36 100644 (file)
@@ -522,4 +522,31 @@ static inline void txqs_stop(struct net_device *netdev)
        }
 }
 
+/**
+ * \brief Wake Tx queues
+ * @param netdev network device
+ */
+static inline void txqs_wake(struct net_device *netdev)
+{
+       struct lio *lio = GET_LIO(netdev);
+
+       if (netif_is_multiqueue(netdev)) {
+               int i;
+
+               for (i = 0; i < netdev->num_tx_queues; i++) {
+                       int qno = lio->linfo.txpciq[i %
+                               lio->oct_dev->num_iqs].s.q_no;
+
+                       if (__netif_subqueue_stopped(netdev, i)) {
+                               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
+                                                         tx_restart, 1);
+                               netif_wake_subqueue(netdev, i);
+                       }
+               }
+       } else {
+               INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
+                                         tx_restart, 1);
+               netif_wake_queue(netdev);
+       }
+}
 #endif