]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: FPGA, Call DMA unmap with the right size
authorIlya Lesokhin <ilyal@mellanox.com>
Mon, 28 Aug 2017 06:47:32 +0000 (09:47 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 30 May 2018 00:27:50 +0000 (17:27 -0700)
commit2225e58a03ff1ddcc2359bc1cb816645ce103914
tree82e5f058464c64d2b9e4d7abc34925e1be1d01f6
parente159448dd19e7b05028b09930d1cdcb8980e91e7
net/mlx5: FPGA, Call DMA unmap with the right size

When mlx5_fpga_conn_unmap_buf is called buf->sg[0].size
should equal the actual buffer size, not the message size.
Otherwise we will trigger the following dma debug warning
"DMA-API: device driver frees DMA memory with different size"

Fixes: 80a8d872d38e ('net/mlx5: FPGA, Add high-speed connection routines')
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c