[PATCH net-next v9 04/15] net: microchip: fdma: use little-endian types for descriptor fields

Simon Horman horms at kernel.org
Fri Oct 2 06:25:48 PDT 2026


On Mon, Sep 28, 2026 at 09:32:52PM +0200, Daniel Machon wrote:
> The FDMA engine reads and writes the DCB and DB descriptors in
> little-endian byte order. So far the descriptors have only been produced
> by the little-endian SoC itself, so plain u64 fields were fine. With the
> PCIe FDMA path, the descriptors live in host memory and are written by
> the host CPU, which may be big-endian.
> 
> Change the descriptor fields to __le64 and convert at the library
> boundary: in __fdma_db_add() and __fdma_dcb_add() on write, and in the
> fdma_db_*() accessors on read. The dataptr and nextptr callbacks keep
> their u64 signatures, so their implementations are unchanged. Add
> fdma_db_dataptr_get(), and convert the lan966x sites that read the
> descriptor fields directly to use the accessors.
> 
> No functional change on little-endian hosts.
> 
> Signed-off-by: Daniel Machon <daniel.machon at microchip.com>

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the linux-arm-kernel mailing list