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