]> Gentwo Git Trees - linux/.git/commit
net: ravb: Make DBAT entry count configurable per-SoC
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 23 Oct 2025 11:21:10 +0000 (12:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 25 Oct 2025 02:04:34 +0000 (19:04 -0700)
commit9078e6c5f1de342ae0c2322c999bbab9c2ad08b7
treea09c30b6f63ce8fe8f89fd528ff3fb6b16a16cab
parentc09b183dc14e0fda14bb99b31b9637ce2e1d3682
net: ravb: Make DBAT entry count configurable per-SoC

Avoid wasting coherent DMA memory by allocating the descriptor base
address table sized for the actual number of DBAT/CDARq entries supported
by the SoC. Some platforms (for example GBETH) only provide two CDARq
entries; previously the driver always allocated space for 22 entries which
needlessly consumed memory on those systems.

Pass the per-SoC dbat_entry_num via struct ravb_hw_info and use it for
allocation and initialization in probe. This sizes the table correctly and
removes the unnecessary memory overhead on SoCs with fewer DBAT entries.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://patch.msgid.link/20251023112111.215198-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c