diff options
author | Niklas Söderlund <[email protected]> | 2024-03-08 23:42:37 +0100 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-03-11 15:16:57 -0700 |
commit | a290d4cb892da3e9e163a40d0ab70ed1531cdc58 (patch) | |
tree | e07feec040f39ed14a7f8ae263be70b20c7d4255 | |
parent | 7598531c3aed26ffd98e054d8d9934e44c0e2c25 (diff) |
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: cfbad64706c1 ("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]>
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index fa48ff4aba2d..d1be030c8848 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -979,7 +979,7 @@ static bool ravb_rx_rcar(struct net_device *ndev, int *quota, int q) if (!skb) break; /* Better luck next round. */ dma_addr = dma_map_single(ndev->dev.parent, skb->data, - le16_to_cpu(desc->ds_cc), + priv->info->rx_max_frame_size, DMA_FROM_DEVICE); skb_checksum_none_assert(skb); /* We just set the data size to 0 for a failed mapping |