mirror-linux/drivers/net/ethernet/sun
Thomas Fourier 561aa0e22b nui: Fix dma_mapping_error() check
dma_map_XXX() functions return values DMA_MAPPING_ERROR as error values
which is often ~0.  The error value should be tested with
dma_mapping_error().

This patch creates a new function in niu_ops to test if the mapping
failed.  The test is fixed in niu_rbr_add_page(), added in
niu_start_xmit() and the successfully mapped pages are unmaped upon error.

Fixes: ec2deec1f3 ("niu: Fix to check for dma mapping errors.")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-07-02 12:00:58 +01:00
..
Kconfig
Makefile
cassini.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cassini.h
ldmvsw.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
niu.c nui: Fix dma_mapping_error() check 2025-07-02 12:00:58 +01:00
niu.h nui: Fix dma_mapping_error() check 2025-07-02 12:00:58 +01:00
sunbmac.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sunbmac.h
sungem.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sungem.h
sunhme.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sunhme.h net: sunhme: Remove residual polling code 2023-03-27 08:41:56 +01:00
sunqe.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
sunqe.h
sunvnet.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
sunvnet_common.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sunvnet_common.h