mlx4_core: add WRITE_MTT support
Subsystems (2)
PATCH v4 3/19 mlx4_core: add WRITE_MTT support
Used by vfs to modify mtts, since they cannot access in-memory mtts directly.
Signed-off-by Liran Liss <liranl-VPRAkNaXOzVS1MOuV/[email protected]>
--- drivers/net/mlx4/cmd.c | 10 +++++- drivers/net/mlx4/mlx4.h | 5 +++ drivers/net/mlx4/mr.c | 67 ++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 74 insertions(+), 8 deletions(-)
drivers/net/mlx4/cmd.c +8 -2
@@ -37,8 +37,6 @@#include <linux/pci.h> #include <linux/errno.h> -#include <linux/mlx4/cmd.h> -#include <asm/io.h> #include "mlx4.h"
@@ -498,6 +496,14 @@ static struct mlx4_cmd_info { .wrapper = NULL }, { + .opcode = MLX4_CMD_WRITE_MTT, + .has_inbox = true, + .has_outbox = false, + .out_is_imm = false, + .verify = NULL, /* need verifier */ + .wrapper = mlx4_WRITE_MTT_wrapper + }, + { .opcode = MLX4_CMD_SYNC_TPT, .has_inbox = true, .has_outbox = false,
drivers/net/mlx4/mlx4.h +5 -0
@@ -46,6 +46,7 @@#include <linux/mlx4/device.h> #include <linux/mlx4/driver.h> #include <linux/mlx4/doorbell.h> +#include <linux/mlx4/cmd.h> #define DRV_NAME "mlx4_core"#define PFX DRV_NAME ": "
@@ -420,6 +421,10 @@ void mlx4_cleanup_qp_table(struct mlx4_dev *dev);void mlx4_cleanup_srq_table (struct mlx4_dev *dev);void mlx4_cleanup_mcg_table (struct mlx4_dev *dev); +int mlx4_WRITE_MTT_wrapper (struct mlx4_dev *dev,int slave,struct mlx4_vhcr *vhcr, +struct mlx4_cmd_mailbox *inbox, +struct mlx4_cmd_mailbox *outbox); +void mlx4_start_catas_poll (struct mlx4_dev *dev);void mlx4_stop_catas_poll (struct mlx4_dev *dev);void mlx4_catas_init (void );
drivers/net/mlx4/mr.c +61 -6
91 lines not on this page · raw message
Signature · 6 lines
1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html