ethernet: ionic: Fix DMA mapping tests
authorThomas Fourier <fourier.thomas@gmail.com>
Thu, 19 Jun 2025 09:45:30 +0000 (11:45 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Jun 2025 23:42:39 +0000 (16:42 -0700)
commitd5e3241c5a386a2425823c8c7afb77a465bd040f
tree4c1051f33ef661a4474cfd6fea7b3bbc857b3742
parentf5990207026987a353d5a95204c4d9cb725637fd
ethernet: ionic: Fix DMA mapping tests

Change error values of `ionic_tx_map_single()` and `ionic_tx_map_frag()`
from 0 to `DMA_MAPPING_ERROR` to prevent collision with 0 as a valid
address.

This also fixes the use of `dma_mapping_error()` to test against 0 in
`ionic_xdp_post_frame()`

Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
Fixes: 56e41ee12d2d ("ionic: better dma-map error handling")
Fixes: ac8813c0ab7d ("ionic: convert Rx queue buffers to use page_pool")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20250619094538.283723-2-fourier.thomas@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c