diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-11-02 12:41:40 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-11-02 15:53:34 +0000 |
commit | 1673b7dca3843698fe47f1df0ee61b88d9431ade (patch) | |
tree | e3f25c1970ab2bbc2087d30770fbc192664545d7 /target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch | |
parent | 9721a42a272aab941ded476a4baa4a85031c3f07 (diff) | |
download | upstream-1673b7dca3843698fe47f1df0ee61b88d9431ade.tar.gz upstream-1673b7dca3843698fe47f1df0ee61b88d9431ade.tar.bz2 upstream-1673b7dca3843698fe47f1df0ee61b88d9431ade.zip |
kernel: backport fixes for MediaTek Ethernet driver
Backport patches from net-next which fix possible memory and resource
leaks in the error codepaths of WED initialization.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch')
-rw-r--r-- | target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch b/target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch new file mode 100644 index 0000000000..27c719b663 --- /dev/null +++ b/target/linux/generic/backport-5.15/726-v6.0-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch @@ -0,0 +1,32 @@ +From c9da02bfb1112461e048d3b736afb1873f6f4ccf Mon Sep 17 00:00:00 2001 +From: Daniel Golle <daniel@makrotopia.org> +Date: Tue, 27 Sep 2022 16:30:02 +0100 +Subject: [PATCH 1/1] net: ethernet: mtk_eth_soc: fix mask of + RX_DMA_GET_SPORT{,_V2} + +The bitmasks applied in RX_DMA_GET_SPORT and RX_DMA_GET_SPORT_V2 macros +were swapped. Fix that. + +Reported-by: Chen Minqiang <ptpt52@gmail.com> +Fixes: 160d3a9b192985 ("net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support") +Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> +Signed-off-by: Daniel Golle <daniel@makrotopia.org> +Link: https://lore.kernel.org/r/YzMW+mg9UsaCdKRQ@makrotopia.org +Signed-off-by: Jakub Kicinski <kuba@kernel.org> +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -315,8 +315,8 @@ + #define MTK_RXD5_PPE_CPU_REASON GENMASK(22, 18) + #define MTK_RXD5_SRC_PORT GENMASK(29, 26) + +-#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0xf) +-#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0x7) ++#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0x7) ++#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0xf) + + /* PDMA V2 descriptor rxd3 */ + #define RX_DMA_VTAG_V2 BIT(0) |