generic: copy backport, hack, pending patch and config from 5.15 to 6.1
[openwrt/staging/ldir.git] / target / linux / generic / pending-6.1 / 736-05-net-ethernet-mtk_eth_soc-add-missing-ppe-cache-flush.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 23 Mar 2023 11:19:14 +0100
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: add missing ppe cache flush when
4 deleting a flow
5
6 The cache needs to be flushed to ensure that the hardware stops offloading
7 the flow immediately.
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
13 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
14 @@ -523,6 +523,7 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
15 hwe->ib1 &= ~MTK_FOE_IB1_STATE;
16 hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
17 dma_wmb();
18 + mtk_ppe_cache_clear(ppe);
19 }
20 entry->hash = 0xffff;
21