Skip to content

net: stmmac: DMA address handling fixes

Alex Elder linux-arm-kernel lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v11 patch 3 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: stmmac: use dma_addr_t for DMA addressesdrivers/net/ethernet/stmicro/stmmac/chain_mode.c drivers/net/ethernet/stmicro/stmmac/ring_mode.c+4 -20 repliesApplied
2/2net: stmmac: convert DMA address to lower 32 before assignmentdrivers/net/ethernet/stmicro/stmmac/chain_mode.c drivers/net/ethernet/stmicro/stmmac/ring_mode.c+9 -90 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMaxime Chevallier
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] net: stmmac: DMA address handling fixes

Update jumbo_frm() (implemented in both "chain_mode.c" and "ring_mode.c") to ensure DMA errors don't get lost due to casting the result to an integer of the wrong size. This was a Sashiko suggestion.

In addition, add explicit calls to lower_32_bits() to DMA addresses before they are passed to cpu_to_le32(), to guarantee the type of the converted value is u32.

Maxime implied that a new version the first patch could handle both fixes, but I thought it better to do them separately.

-Alex

Here is v1 of the series (the patch):
https://lore.kernel.org/lkml/[email protected]/

Alex Elder (2):
net: stmmac: use dma_addr_t for DMA addresses
net: stmmac: convert DMA address to lower 32 before assignment

 drivers/net/ethernet/stmicro/stmmac/chain_mode.c |  9 +++++----
 drivers/net/ethernet/stmicro/stmmac/ring_mode.c  | 15 ++++++++-------
 2 files changed, 13 insertions(+), 11 deletions(-)

base-commit: 5e6de6a2b522f659defacb1551d0465ba6ce13cf

Signature · 1 line
2.53.0