]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ionic: better dma-map error handling
authorShannon Nelson <shannon.nelson@amd.com>
Wed, 6 Mar 2024 23:29:58 +0000 (15:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 11:54:34 +0000 (11:54 +0000)
commit56e41ee12d2d63905948dda6934d3298ed6b9310
tree94acf53903fb1549b98e049c3046263a3c16c1df
parenta12c1e7a6449c39b3dd6ae12bf410281ea79a9ad
ionic: better dma-map error handling

Fix up a couple of small dma_addr handling issues
  - don't double-count dma-map-err stat in ionic_tx_map_skb()
    or ionic_xdp_post_frame()
  - return 0 on error from both ionic_tx_map_single() and
    ionic_tx_map_frag() and check for !dma_addr in ionic_tx_map_skb()
    and ionic_xdp_post_frame()
  - be sure to unmap buf_info[0] in ionic_tx_map_skb() error path
  - don't assign rx buf->dma_addr until error checked in ionic_rx_page_alloc()
  - remove unnecessary dma_addr_t casts

Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c