Skip to content

Commit a290d4c

Browse files
Niklas Söderlundkuba-moo
authored andcommitted
ravb: Correct buffer size to map for R-Car Rx
When creating a helper to allocate and align an skb one location where the skb data size was updated was missed. This can lead to a warning being printed when the memory is being unmapped as it now always unmap the maximum frame size, instead of the size after it have been aligned. This was correctly done for RZ/G2L but missed for R-Car. Fixes: cfbad64 ("ravb: Create helper to allocate skb and align it") Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7598531 commit a290d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ static bool ravb_rx_rcar(struct net_device *ndev, int *quota, int q)
979979
if (!skb)
980980
break; /* Better luck next round. */
981981
dma_addr = dma_map_single(ndev->dev.parent, skb->data,
982-
le16_to_cpu(desc->ds_cc),
982+
priv->info->rx_max_frame_size,
983983
DMA_FROM_DEVICE);
984984
skb_checksum_none_assert(skb);
985985
/* We just set the data size to 0 for a failed mapping

0 commit comments

Comments
 (0)