On Mon, Jun 30, 2025 at 10:47:02PM +0100, Daniel Golle wrote:
Use a dedicated "mmio-sram" and the genpool allocator instead of
open-coding SRAM allocation for DMA rings.
Keep support for legacy device trees but notify the user via a
warning to update.
Co-developed-by: Frank Wunderlich <redacted>
Signed-off-by: Frank Wunderlich <redacted>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v3: fix resource leak on error in mtk_probe()
v2: fix return type of mtk_dma_ring_alloc() in case of error
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 117 +++++++++++++-------
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +-
2 files changed, 83 insertions(+), 38 deletions(-)
I just noticed I forgot to 'git add' the Kconfig change adding 'select
GENERIC_ALLOCATOR' for NET_MEDIATEK_SOC... I will include that in v4 and
also add a patch dropping the open coded static partitioning of the SRAM
in favor of always using the gen_pool allocator even with legacy device
trees.
Meanwhile I would still be thankful to see this patch reviewed as apart
from the Kconfig addition it won't change.