[PATCH v2 0/4] net: ravb: Fix SoC-specific configuration and descriptor handling issues

Prabhakar posted 4 patches 2 months ago
drivers/net/ethernet/renesas/ravb.h      |  2 +-
drivers/net/ethernet/renesas/ravb_main.c | 40 +++++++++++++++++++-----
2 files changed, 34 insertions(+), 8 deletions(-)
[PATCH v2 0/4] net: ravb: Fix SoC-specific configuration and descriptor handling issues
Posted by Prabhakar 2 months ago
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi all,

This series addresses several issues in the Renesas Ethernet AVB (ravb)
driver related to SoC-specific resource configuration and descriptor
ordering.

Different Renesas SoCs implement varying numbers of descriptor entries and
queue capabilities, which were previously hardcoded or misconfigured.
Additionally, a potential ordering hazard in descriptor setup could cause
the DMA engine to start prematurely, leading to TX stalls on some
platforms.

The series includes the following changes:

Make DBAT entry count configurable per SoC
The number of descriptor base address table (DBAT) entries is not uniform
across all SoCs. Pass this information via the hardware info structure and
allocate resources accordingly.

Allocate correct number of queues based on SoC support
Use the per-SoC configuration to determine whether a network control queue
is available, and allocate queues dynamically to match the SoC's
capability.

Enforce descriptor type ordering to prevent early DMA start
Ensure proper write ordering of TX descriptor type fields to prevent the
DMA engine from observing an incomplete descriptor chain. This fixes
observed TX stalls on RZ/G2L platforms running RT kernels.

All four patches include Fixes tags and should be considered for stable
backporting.

Tested on R/G1x Gen2, RZ/G2x Gen3 and RZ/G2L family hardware.

Note, I've not added net-next in the subject as these are bug fixes for
existing functionality.

v1->v2:
- Split up patch 3/3 from v1 into two separate patches for clarity
  of using dma_wmb() for enforcing ordering.
- Updated commit message for patch 3/4
- Added Reviewed-by tag from Niklas for patches 1 and 2.
Cheers,
Prabhakar

Lad Prabhakar (4):
  net: ravb: Make DBAT entry count configurable per-SoC
  net: ravb: Allocate correct number of queues based on SoC support
  net: ravb: Enforce descriptor type ordering
  net: ravb: Ensure memory write completes before ringing TX doorbell

 drivers/net/ethernet/renesas/ravb.h      |  2 +-
 drivers/net/ethernet/renesas/ravb_main.c | 40 +++++++++++++++++++-----
 2 files changed, 34 insertions(+), 8 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/4] net: ravb: Fix SoC-specific configuration and descriptor handling issues
Posted by Jakub Kicinski 1 month, 3 weeks ago
On Fri, 17 Oct 2025 16:18:26 +0100 Prabhakar wrote:
>   net: ravb: Make DBAT entry count configurable per-SoC
>   net: ravb: Allocate correct number of queues based on SoC support

These need a better commit message underlining the severity of the
issue. Failing that they should lose the Fixes and stable tags and
get reposted for net-next.

>   net: ravb: Enforce descriptor type ordering
>   net: ravb: Ensure memory write completes before ringing TX doorbell

This are not controversial, I picked them up to net. Thanks