[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180324003725.GA6531@felix-thinkpad.cavium.com>
Date: Fri, 23 Mar 2018 17:37:25 -0700
From: Felix Manlunas <felix.manlunas@...ium.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, raghu.vatsavayi@...ium.com,
derek.chickles@...ium.com, satananda.burla@...ium.com,
intiyaz.basha@...ium.com
Subject: [PATCH net-next 06/13] liquidio: Removed start_txq function
From: Intiyaz Basha <intiyaz.basha@...ium.com>
Removing start_txq function from VF and PF files
Signed-off-by: Intiyaz Basha <intiyaz.basha@...ium.com>
Acked-by: Derek Chickles <derek.chickles@...ium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@...ium.com>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 16 +---------------
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 16 +---------------
drivers/net/ethernet/cavium/liquidio/octeon_network.h | 16 ++++++++++------
3 files changed, 12 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 6b44d44..41e992c 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -509,20 +509,6 @@ static void liquidio_deinit_pci(void)
}
/**
- * \brief Start Tx queue
- * @param netdev network device
- */
-static void start_txq(struct net_device *netdev)
-{
- struct lio *lio = GET_LIO(netdev);
-
- if (lio->linfo.link.s.link_up) {
- txqs_start(netdev);
- return;
- }
-}
-
-/**
* \brief Wake a queue
* @param netdev network device
* @param q which queue to wake
@@ -2140,7 +2126,7 @@ static int liquidio_open(struct net_device *netdev)
return -1;
}
- start_txq(netdev);
+ txqs_start(netdev);
/* tell Octeon to start forwarding packets to host */
send_rx_ctrl_cmd(lio, 1);
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index 5f0114d..57b6ee5 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
@@ -285,20 +285,6 @@ static pci_ers_result_t liquidio_pcie_error_detected(struct pci_dev *pdev,
};
/**
- * \brief Start Tx queue
- * @param netdev network device
- */
-static void start_txq(struct net_device *netdev)
-{
- struct lio *lio = GET_LIO(netdev);
-
- if (lio->linfo.link.s.link_up) {
- txqs_start(netdev);
- return;
- }
-}
-
-/**
* \brief Wake a queue
* @param netdev network device
* @param q which queue to wake
@@ -1189,7 +1175,7 @@ static int liquidio_open(struct net_device *netdev)
lio->intf_open = 1;
netif_info(lio, ifup, lio->netdev, "Interface Open, ready for traffic\n");
- start_txq(netdev);
+ txqs_start(netdev);
/* tell Octeon to start forwarding packets to host */
send_rx_ctrl_cmd(lio, 1);
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_network.h b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
index cd334a7..72a581a 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_network.h
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
@@ -556,13 +556,17 @@ static inline void txqs_wake(struct net_device *netdev)
*/
static inline void txqs_start(struct net_device *netdev)
{
- if (netif_is_multiqueue(netdev)) {
- int i;
+ struct lio *lio = GET_LIO(netdev);
- for (i = 0; i < netdev->num_tx_queues; i++)
- netif_start_subqueue(netdev, i);
- } else {
- netif_start_queue(netdev);
+ if (lio->linfo.link.s.link_up) {
+ if (netif_is_multiqueue(netdev)) {
+ int i;
+
+ for (i = 0; i < netdev->num_tx_queues; i++)
+ netif_start_subqueue(netdev, i);
+ } else {
+ netif_start_queue(netdev);
+ }
}
}
--
1.8.3.1
Powered by blists - more mailing lists