aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Chevallier <maxime.chevallier@bootlin.com>2019-06-11 11:51:43 +0200
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 12:21:31 -0400
commita3513225b7d52cffdf32528d2329fd58447e0931 (patch)
treeeed845f8dd9aaed2791f3d6cd0c69eaed9776554
parentf54e15478bc9a3ec112409d533ac89727275f732 (diff)
downloadlinux-yocto-a3513225b7d52cffdf32528d2329fd58447e0931.tar.gz
linux-yocto-a3513225b7d52cffdf32528d2329fd58447e0931.tar.bz2
linux-yocto-a3513225b7d52cffdf32528d2329fd58447e0931.zip
net: mvpp2: prs: Use the correct helpers when removing all VID filters
commit 6b7a3430c163455cf8a514d636bda52b04654972 upstream. When removing all VID filters, the mvpp2_prs_vid_entry_remove would be called with the TCAM id incorrectly used as a VID, causing the wrong TCAM entries to be invalidated. Fix this by directly invalidating entries in the VID range. Fixes: 56beda3db602 ("net: mvpp2: Add hardware offloading for VLAN filtering") Suggested-by: Yuri Chipchev <yuric@marvell.com> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
index 4819f9883677..4a642ad1cfa2 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
@@ -2047,8 +2047,10 @@ void mvpp2_prs_vid_remove_all(struct mvpp2_port *port)
for (tid = MVPP2_PRS_VID_PORT_FIRST(port->id);
tid <= MVPP2_PRS_VID_PORT_LAST(port->id); tid++) {
- if (priv->prs_shadow[tid].valid)
- mvpp2_prs_vid_entry_remove(port, tid);
+ if (priv->prs_shadow[tid].valid) {
+ mvpp2_prs_hw_inv(priv, tid);
+ priv->prs_shadow[tid].valid = false;
+ }
}
}