]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.19/net-mvpp2-prs-use-the-correct-helpers-when-removing-.patch
fix up the 5.1 queue :(
[thirdparty/kernel/stable-queue.git] / queue-4.19 / net-mvpp2-prs-use-the-correct-helpers-when-removing-.patch
CommitLineData
a15a8890
SL
1From 8f1114692bcc6038f9179a8376ae873f1fbac8bc Mon Sep 17 00:00:00 2001
2From: Maxime Chevallier <maxime.chevallier@bootlin.com>
3Date: Tue, 11 Jun 2019 11:51:43 +0200
4Subject: net: mvpp2: prs: Use the correct helpers when removing all VID
5 filters
6
7[ Upstream commit 6b7a3430c163455cf8a514d636bda52b04654972 ]
8
9When removing all VID filters, the mvpp2_prs_vid_entry_remove would be
10called with the TCAM id incorrectly used as a VID, causing the wrong
11TCAM entries to be invalidated.
12
13Fix this by directly invalidating entries in the VID range.
14
15Fixes: 56beda3db602 ("net: mvpp2: Add hardware offloading for VLAN filtering")
16Suggested-by: Yuri Chipchev <yuric@marvell.com>
17Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 6 ++++--
22 1 file changed, 4 insertions(+), 2 deletions(-)
23
24diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
25index e0da4db3bf56..ae2240074d8e 100644
26--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
27+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
28@@ -2025,8 +2025,10 @@ void mvpp2_prs_vid_remove_all(struct mvpp2_port *port)
29
30 for (tid = MVPP2_PRS_VID_PORT_FIRST(port->id);
31 tid <= MVPP2_PRS_VID_PORT_LAST(port->id); tid++) {
32- if (priv->prs_shadow[tid].valid)
33- mvpp2_prs_vid_entry_remove(port, tid);
34+ if (priv->prs_shadow[tid].valid) {
35+ mvpp2_prs_hw_inv(priv, tid);
36+ priv->prs_shadow[tid].valid = false;
37+ }
38 }
39 }
40
41--
422.20.1
43