aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/mad.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2011-12-12 23:10:51 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-13 13:56:05 -0500
commitf9baff509f8a05a79626defdbdf4f4aa4efd373b (patch)
treed4f0e425cd8c8999775f0f135c9825e3bbdc180c /drivers/infiniband/hw/mlx4/mad.c
parent65dab25deb8da7dba4b6dd0145a9143be7f8369f (diff)
mlx4_core: Add "native" argument to mlx4_cmd and its callers (where needed)
For SRIOV, some Hypervisor commands can be executed directly (native = 1). Others should go through the command wrapper flow (for tracking resource usage, for example, or for changing some HCA configurations that slaves need to be notified of). This patch sets the groundwork for this capability -- adding the correct value of "native" in each case. Note that if SRIOV is not activated, this parameter has no effect. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mad.c')
-rw-r--r--drivers/infiniband/hw/mlx4/mad.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index f36da994a85a..95c94d8f0254 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -109,7 +109,8 @@ int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int ignore_mkey, int ignore_bkey,
109 109
110 err = mlx4_cmd_box(dev->dev, inmailbox->dma, outmailbox->dma, 110 err = mlx4_cmd_box(dev->dev, inmailbox->dma, outmailbox->dma,
111 in_modifier, op_modifier, 111 in_modifier, op_modifier,
112 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); 112 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C,
113 MLX4_CMD_NATIVE);
113 114
114 if (!err) 115 if (!err)
115 memcpy(response_mad, outmailbox->buf, 256); 116 memcpy(response_mad, outmailbox->buf, 256);
@@ -330,7 +331,8 @@ static int iboe_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
330 return IB_MAD_RESULT_FAILURE; 331 return IB_MAD_RESULT_FAILURE;
331 332
332 err = mlx4_cmd_box(dev->dev, 0, mailbox->dma, inmod, 0, 333 err = mlx4_cmd_box(dev->dev, 0, mailbox->dma, inmod, 0,
333 MLX4_CMD_QUERY_IF_STAT, MLX4_CMD_TIME_CLASS_C); 334 MLX4_CMD_QUERY_IF_STAT, MLX4_CMD_TIME_CLASS_C,
335 MLX4_CMD_WRAPPED);
334 if (err) 336 if (err)
335 err = IB_MAD_RESULT_FAILURE; 337 err = IB_MAD_RESULT_FAILURE;
336 else { 338 else {