From: Ilya Lesokhin Date: Tue, 14 Nov 2017 08:30:55 +0000 (+0200) Subject: net/mlx5: FPGA, Properly initialize dma direction on fpga conn send X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ba869ee0e0f53077f58ce43a9381b4ee0a20cdd6;p=linux.git net/mlx5: FPGA, Properly initialize dma direction on fpga conn send Properly initialize dma direction on fpga conn send. Do not rely on dma_dir == 0 (DMA_BIDIRECTIONAL). Signed-off-by: Ilya Lesokhin Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c index 4e5a5cf25f177..bf84678b21d62 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c @@ -181,6 +181,7 @@ int mlx5_fpga_conn_send(struct mlx5_fpga_conn *conn, if (!conn->qp.active) return -ENOTCONN; + buf->dma_dir = DMA_TO_DEVICE; err = mlx5_fpga_conn_map_buf(conn, buf); if (err) return err;