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)
commit36dd4902004c39b7e8a16a7cf1535faa7ecfa921
tree82e5f058464c64d2b9e4d7abc34925e1be1d01f6
parentba869ee0e0f53077f58ce43a9381b4ee0a20cdd6
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: 537a50574175 ('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