aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0288-staging-fsl_ppfe-eth-remove-unused-functions.patch
blob: 2e9f4900f43c34d617af188a7499f9102808b7a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From accfaecbbcb882dcc2d47660a644c353ae337861 Mon Sep 17 00:00:00 2001
From: Calvin Johnson <calvin.johnson@nxp.com>
Date: Wed, 18 Oct 2017 14:29:30 +0530
Subject: [PATCH] staging: fsl_ppfe/eth: remove unused functions

Remove unused functions hif_xmit_pkt & hif_lib_xmit_pkt.

Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
---
 drivers/staging/fsl_ppfe/pfe_hif.c     | 24 +-----------------------
 drivers/staging/fsl_ppfe/pfe_hif_lib.c | 34 ----------------------------------
 2 files changed, 1 insertion(+), 57 deletions(-)

--- a/drivers/staging/fsl_ppfe/pfe_hif.c
+++ b/drivers/staging/fsl_ppfe/pfe_hif.c
@@ -844,29 +844,6 @@ skip_tx:
 	return;
 }
 
-int hif_xmit_pkt(struct pfe_hif *hif, unsigned int client_id, unsigned int q_no,
-		 void *data, unsigned int len)
-{
-	int rc = 0;
-
-	spin_lock_bh(&hif->tx_lock);
-
-	if (!hif->txavail) {
-		rc = 1;
-	} else {
-		__hif_xmit_pkt(hif, client_id, q_no, data, len,
-			       HIF_FIRST_BUFFER | HIF_LAST_BUFFER);
-		hif_tx_dma_start();
-	}
-
-	if (hif->txavail < (hif->tx_ring_size >> 1))
-		__hif_tx_done_process(hif, TX_FREE_MAX_COUNT);
-
-	spin_unlock_bh(&hif->tx_lock);
-
-	return rc;
-}
-
 static irqreturn_t wol_isr(int irq, void *dev_id)
 {
 	pr_info("WoL\n");
@@ -907,6 +884,7 @@ static irqreturn_t hif_isr(int irq, void
 			__napi_schedule(&hif->napi);
 		}
 	}
+
 	if (int_status & HIF_TXPKT_INT) {
 		int_status &= ~(HIF_TXPKT_INT);
 		int_enable_mask &= ~(HIF_TXPKT_INT);
--- a/drivers/staging/fsl_ppfe/pfe_hif_lib.c
+++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.c
@@ -512,40 +512,6 @@ void __hif_lib_xmit_pkt(struct hif_clien
 	queue->jiffies_last_packet = jiffies;
 }
 
-/*This function puts the given packet in the specific client queue */
-int hif_lib_xmit_pkt(struct hif_client_s *client, unsigned int qno, void *data,
-		     unsigned int len, u32 client_ctrl, void *client_data)
-{
-	struct hif_client_tx_queue *queue = &client->tx_q[qno];
-	struct tx_queue_desc *desc = queue->base + queue->write_idx;
-
-	if (queue->tx_pending < queue->size) {
-		/*Construct pkt header */
-
-		data -= sizeof(struct hif_hdr);
-		len += sizeof(struct hif_hdr);
-
-		hif_hdr_write(data, client->id, qno, client_ctrl);
-
-		desc->data = client_data;
-		desc->ctrl = CL_DESC_OWN | CL_DESC_FLAGS(HIF_FIRST_BUFFER |
-				HIF_LAST_BUFFER | HIF_DATA_VALID);
-
-		if (hif_xmit_pkt(&pfe->hif, client->id, qno, data, len))
-			return 1;
-
-		inc_cl_idx(queue->write_idx);
-		queue->tx_pending++;
-		queue->jiffies_last_packet = jiffies;
-
-		return 0;
-	}
-
-	pr_debug("%s Tx client %d qno %d is full\n", __func__, client->id,
-		 qno);
-	return 1;
-}
-
 void *hif_lib_tx_get_next_complete(struct hif_client_s *client, int qno,
 				   unsigned int *flags, int count)
 {