Nikita Yushchenko
f9071d939f
net: ravb: Fix dma_addr_t truncation in error case
...
[ Upstream commit e327b2372bc0f18c30433ac40be07741b59231c5 ]
In ravb_start_xmit(), ravb driver uses u32 variable to store result of
dma_map_single() call. Since ravb hardware has 32-bit address fields in
descriptors, this works properly when mapping is successful - it is
platform's job to provide mapping addresses that fit into hardware
limitations.
However, in failure case dma_map_single() returns DMA_MAPPING_ERROR
constant that is 64-bit when dma_addr_t is 64-bit. Storing this constant
in u32 leads to truncation, and further call to dma_mapping_error()
fails to notice the error.
Fix that by storing result of dma_map_single() in a dma_addr_t
variable.
Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru >
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-25 15:35:58 -08:00
..
2024-01-25 15:35:38 -08:00
2023-08-11 21:12:45 +02:00
2024-01-25 15:35:51 -08:00
2023-08-22 15:50:57 +02:00
2024-01-25 15:35:42 -08:00
2023-12-08 08:52:17 +01:00
2023-12-20 17:01:46 +01:00
2023-08-30 13:34:34 -07:00
2024-01-25 15:35:51 -08:00
2024-01-25 15:35:29 -08:00
2024-01-25 15:35:29 -08:00
2024-01-25 15:35:53 -08:00
2023-10-26 09:42:37 +02:00
2023-11-28 17:20:00 +00:00
2024-01-25 15:35:38 -08:00
2024-01-25 15:35:42 -08:00
2023-09-12 15:49:20 +02:00
2024-01-20 11:51:47 +01:00
2023-10-02 13:13:15 +02:00
2024-01-25 15:35:14 -08:00
2024-01-25 15:35:15 -08:00
2024-01-25 15:35:18 -08:00
2024-01-25 15:35:55 -08:00
2023-08-24 16:20:30 -07:00
2023-11-20 11:59:00 +01:00
2024-01-10 17:16:59 +01:00
2023-12-08 08:52:19 +01:00
2024-01-25 15:35:12 -08:00
2024-01-10 17:17:00 +01:00
2024-01-25 15:35:20 -08:00
2023-10-24 19:32:39 +02:00
2023-08-22 15:51:33 +02:00
2024-01-25 15:35:40 -08:00
2024-01-25 15:35:45 -08:00
2024-01-25 15:35:48 -08:00
2023-11-20 11:59:08 +01:00
2023-09-04 11:26:29 -07:00
2024-01-20 11:51:42 +01:00
2024-01-20 11:51:49 +01:00
2024-01-20 11:51:46 +01:00
2023-11-28 17:20:06 +00:00
2024-01-25 15:35:12 -08:00
2024-01-25 15:35:52 -08:00
2024-01-25 15:35:40 -08:00
2024-01-25 15:35:41 -08:00
2024-01-01 12:42:36 +00:00
2024-01-25 15:35:54 -08:00
2023-08-11 21:12:46 +02:00
2023-12-03 07:33:02 +01:00
2023-10-23 09:39:46 +01:00
2024-01-25 15:35:49 -08:00
2023-08-31 12:43:10 -07:00
2023-09-05 10:11:01 -05:00
2023-11-28 17:20:05 +00:00
2024-01-25 15:35:46 -08:00
2024-01-25 15:35:35 -08:00
2023-11-20 11:59:17 +01:00
2024-01-25 15:35:49 -08:00
2023-12-13 18:45:29 +01:00
2024-01-25 15:35:39 -08:00
2024-01-25 15:35:15 -08:00
2023-08-28 13:36:24 -05:00
2024-01-25 15:35:58 -08:00
2023-12-20 17:01:59 +01:00
2023-08-22 12:38:19 -04:00
2023-11-20 11:59:19 +01:00
2024-01-25 15:35:55 -08:00
2024-01-01 12:42:44 +00:00
2024-01-25 15:35:40 -08:00
2023-08-18 10:55:49 +05:30
2023-11-28 17:20:08 +00:00
2024-01-20 11:51:48 +01:00
2024-01-25 15:35:55 -08:00
2023-11-20 11:59:31 +01:00
2024-01-25 15:35:13 -08:00
2024-01-10 17:16:57 +01:00
2024-01-20 11:51:46 +01:00
2024-01-25 15:35:14 -08:00
2023-11-28 17:20:00 +00:00
2023-08-17 19:38:35 +02:00
2024-01-25 15:35:54 -08:00
2023-12-13 18:45:25 +01:00
2023-11-28 17:19:51 +00:00
2024-01-25 15:35:46 -08:00
2023-11-20 11:59:07 +01:00
2023-09-04 15:12:26 -07:00
2024-01-20 11:51:44 +01:00
2023-09-04 15:08:52 -07:00
2023-11-20 11:59:30 +01:00
2024-01-20 11:51:44 +01:00
2023-08-28 13:36:24 -05:00
2024-01-25 15:35:45 -08:00
2024-01-25 15:35:27 -08:00
2024-01-20 11:51:42 +01:00
2024-01-25 15:35:55 -08:00
2024-01-25 15:35:53 -08:00
2024-01-25 15:35:32 -08:00
2024-01-25 15:35:45 -08:00
2023-12-13 18:45:11 +01:00
2024-01-25 15:35:15 -08:00
2024-01-01 12:42:46 +00:00
2024-01-25 15:35:55 -08:00
2024-01-25 15:35:45 -08:00
2024-01-20 11:51:48 +01:00
2024-01-25 15:35:54 -08:00
2024-01-25 15:35:54 -08:00
2024-01-25 15:35:55 -08:00
2024-01-25 15:35:26 -08:00
2024-01-25 15:35:45 -08:00
2023-11-20 11:59:30 +01:00
2024-01-05 15:19:41 +01:00
2023-09-13 10:48:42 +02:00
2024-01-25 15:35:37 -08:00
2023-12-03 07:33:07 +01:00
2023-08-21 13:27:44 +02:00
2023-09-08 11:24:34 -07:00
2023-09-13 11:09:21 +02:00