net/mlx5: FPGA, Properly initialize dma direction on fpga conn send
authorIlya Lesokhin <ilyal@mellanox.com>
Tue, 14 Nov 2017 08:30:55 +0000 (10:30 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 30 May 2018 00:27:50 +0000 (17:27 -0700)
Properly initialize dma direction on fpga conn send.
Do not rely on dma_dir == 0 (DMA_BIDIRECTIONAL).

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

index 4e5a5cf..bf84678 100644 (file)
@@ -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;