aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
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/net
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/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cmd.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cq.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_port.c15
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_selftest.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/eq.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.c45
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/icm.c5
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mcg.c10
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mr.c8
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/port.c12
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/qp.c11
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/sense.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/srq.c8
13 files changed, 81 insertions, 55 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index 78f5a1a0b8c8..b27654e5d544 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -311,7 +311,7 @@ out:
311 311
312int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, 312int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
313 int out_is_imm, u32 in_modifier, u8 op_modifier, 313 int out_is_imm, u32 in_modifier, u8 op_modifier,
314 u16 op, unsigned long timeout) 314 u16 op, unsigned long timeout, int native)
315{ 315{
316 if (mlx4_priv(dev)->cmd.use_events) 316 if (mlx4_priv(dev)->cmd.use_events)
317 return mlx4_cmd_wait(dev, in_param, out_param, out_is_imm, 317 return mlx4_cmd_wait(dev, in_param, out_param, out_is_imm,
diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c
index 499a5168892a..ebd0eb234f14 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
@@ -118,14 +118,14 @@ static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
118 int cq_num) 118 int cq_num)
119{ 119{
120 return mlx4_cmd(dev, mailbox->dma, cq_num, 0, MLX4_CMD_SW2HW_CQ, 120 return mlx4_cmd(dev, mailbox->dma, cq_num, 0, MLX4_CMD_SW2HW_CQ,
121 MLX4_CMD_TIME_CLASS_A); 121 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
122} 122}
123 123
124static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 124static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
125 int cq_num, u32 opmod) 125 int cq_num, u32 opmod)
126{ 126{
127 return mlx4_cmd(dev, mailbox->dma, cq_num, opmod, MLX4_CMD_MODIFY_CQ, 127 return mlx4_cmd(dev, mailbox->dma, cq_num, opmod, MLX4_CMD_MODIFY_CQ,
128 MLX4_CMD_TIME_CLASS_A); 128 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
129} 129}
130 130
131static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 131static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
@@ -133,7 +133,7 @@ static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
133{ 133{
134 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, cq_num, 134 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, cq_num,
135 mailbox ? 0 : 1, MLX4_CMD_HW2SW_CQ, 135 mailbox ? 0 : 1, MLX4_CMD_HW2SW_CQ,
136 MLX4_CMD_TIME_CLASS_A); 136 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
137} 137}
138 138
139int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, 139int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq,
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_port.c b/drivers/net/ethernet/mellanox/mlx4/en_port.c
index 03c84cd78cde..ae120effb8a5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_port.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_port.c
@@ -45,7 +45,8 @@ int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port,
45 u64 mac, u64 clear, u8 mode) 45 u64 mac, u64 clear, u8 mode)
46{ 46{
47 return mlx4_cmd(dev, (mac | (clear << 63)), port, mode, 47 return mlx4_cmd(dev, (mac | (clear << 63)), port, mode,
48 MLX4_CMD_SET_MCAST_FLTR, MLX4_CMD_TIME_CLASS_B); 48 MLX4_CMD_SET_MCAST_FLTR, MLX4_CMD_TIME_CLASS_B,
49 MLX4_CMD_WRAPPED);
49} 50}
50 51
51int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv) 52int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv)
@@ -72,7 +73,7 @@ int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv)
72 filter->entry[i] = cpu_to_be32(entry); 73 filter->entry[i] = cpu_to_be32(entry);
73 } 74 }
74 err = mlx4_cmd(dev, mailbox->dma, priv->port, 0, MLX4_CMD_SET_VLAN_FLTR, 75 err = mlx4_cmd(dev, mailbox->dma, priv->port, 0, MLX4_CMD_SET_VLAN_FLTR,
75 MLX4_CMD_TIME_CLASS_B); 76 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
76 mlx4_free_cmd_mailbox(dev, mailbox); 77 mlx4_free_cmd_mailbox(dev, mailbox);
77 return err; 78 return err;
78} 79}
@@ -101,7 +102,7 @@ int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu,
101 102
102 in_mod = MLX4_SET_PORT_GENERAL << 8 | port; 103 in_mod = MLX4_SET_PORT_GENERAL << 8 | port;
103 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, 104 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT,
104 MLX4_CMD_TIME_CLASS_B); 105 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
105 106
106 mlx4_free_cmd_mailbox(dev, mailbox); 107 mlx4_free_cmd_mailbox(dev, mailbox);
107 return err; 108 return err;
@@ -140,7 +141,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
140 141
141 in_mod = MLX4_SET_PORT_RQP_CALC << 8 | port; 142 in_mod = MLX4_SET_PORT_RQP_CALC << 8 | port;
142 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, 143 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT,
143 MLX4_CMD_TIME_CLASS_B); 144 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
144 145
145 mlx4_free_cmd_mailbox(dev, mailbox); 146 mlx4_free_cmd_mailbox(dev, mailbox);
146 return err; 147 return err;
@@ -159,7 +160,8 @@ int mlx4_en_QUERY_PORT(struct mlx4_en_dev *mdev, u8 port)
159 return PTR_ERR(mailbox); 160 return PTR_ERR(mailbox);
160 memset(mailbox->buf, 0, sizeof(*qport_context)); 161 memset(mailbox->buf, 0, sizeof(*qport_context));
161 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, port, 0, 162 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, port, 0,
162 MLX4_CMD_QUERY_PORT, MLX4_CMD_TIME_CLASS_B); 163 MLX4_CMD_QUERY_PORT, MLX4_CMD_TIME_CLASS_B,
164 MLX4_CMD_WRAPPED);
163 if (err) 165 if (err)
164 goto out; 166 goto out;
165 qport_context = mailbox->buf; 167 qport_context = mailbox->buf;
@@ -204,7 +206,8 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
204 return PTR_ERR(mailbox); 206 return PTR_ERR(mailbox);
205 memset(mailbox->buf, 0, sizeof(*mlx4_en_stats)); 207 memset(mailbox->buf, 0, sizeof(*mlx4_en_stats));
206 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, in_mod, 0, 208 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, in_mod, 0,
207 MLX4_CMD_DUMP_ETH_STATS, MLX4_CMD_TIME_CLASS_B); 209 MLX4_CMD_DUMP_ETH_STATS, MLX4_CMD_TIME_CLASS_B,
210 MLX4_CMD_WRAPPED);
208 if (err) 211 if (err)
209 goto out; 212 goto out;
210 213
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
index 9fdbcecd499d..bf2e5d3f177c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
@@ -43,7 +43,7 @@
43static int mlx4_en_test_registers(struct mlx4_en_priv *priv) 43static int mlx4_en_test_registers(struct mlx4_en_priv *priv)
44{ 44{
45 return mlx4_cmd(priv->mdev->dev, 0, 0, 0, MLX4_CMD_HW_HEALTH_CHECK, 45 return mlx4_cmd(priv->mdev->dev, 0, 0, 0, MLX4_CMD_HW_HEALTH_CHECK,
46 MLX4_CMD_TIME_CLASS_A); 46 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
47} 47}
48 48
49static int mlx4_en_test_loopback_xmit(struct mlx4_en_priv *priv) 49static int mlx4_en_test_loopback_xmit(struct mlx4_en_priv *priv)
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index ad9e3770b050..9e5863dfa60a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -255,21 +255,24 @@ static int mlx4_MAP_EQ(struct mlx4_dev *dev, u64 event_mask, int unmap,
255 int eq_num) 255 int eq_num)
256{ 256{
257 return mlx4_cmd(dev, event_mask, (unmap << 31) | eq_num, 257 return mlx4_cmd(dev, event_mask, (unmap << 31) | eq_num,
258 0, MLX4_CMD_MAP_EQ, MLX4_CMD_TIME_CLASS_B); 258 0, MLX4_CMD_MAP_EQ, MLX4_CMD_TIME_CLASS_B,
259 MLX4_CMD_WRAPPED);
259} 260}
260 261
261static int mlx4_SW2HW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 262static int mlx4_SW2HW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
262 int eq_num) 263 int eq_num)
263{ 264{
264 return mlx4_cmd(dev, mailbox->dma, eq_num, 0, MLX4_CMD_SW2HW_EQ, 265 return mlx4_cmd(dev, mailbox->dma, eq_num, 0, MLX4_CMD_SW2HW_EQ,
265 MLX4_CMD_TIME_CLASS_A); 266 MLX4_CMD_TIME_CLASS_A,
267 MLX4_CMD_WRAPPED);
266} 268}
267 269
268static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 270static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
269 int eq_num) 271 int eq_num)
270{ 272{
271 return mlx4_cmd_box(dev, 0, mailbox->dma, eq_num, 0, MLX4_CMD_HW2SW_EQ, 273 return mlx4_cmd_box(dev, 0, mailbox->dma, eq_num, 0, MLX4_CMD_HW2SW_EQ,
272 MLX4_CMD_TIME_CLASS_A); 274 MLX4_CMD_TIME_CLASS_A,
275 MLX4_CMD_WRAPPED);
273} 276}
274 277
275static int mlx4_num_eq_uar(struct mlx4_dev *dev) 278static int mlx4_num_eq_uar(struct mlx4_dev *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 435ca6e49734..9659fb085e5e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -139,7 +139,7 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg)
139 MLX4_PUT(inbox, cfg->log_pg_sz_m, MOD_STAT_CFG_PG_SZ_M_OFFSET); 139 MLX4_PUT(inbox, cfg->log_pg_sz_m, MOD_STAT_CFG_PG_SZ_M_OFFSET);
140 140
141 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_MOD_STAT_CFG, 141 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_MOD_STAT_CFG,
142 MLX4_CMD_TIME_CLASS_A); 142 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
143 143
144 mlx4_free_cmd_mailbox(dev, mailbox); 144 mlx4_free_cmd_mailbox(dev, mailbox);
145 return err; 145 return err;
@@ -229,7 +229,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
229 outbox = mailbox->buf; 229 outbox = mailbox->buf;
230 230
231 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP, 231 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP,
232 MLX4_CMD_TIME_CLASS_A); 232 MLX4_CMD_TIME_CLASS_A, !mlx4_is_slave(dev));
233 if (err) 233 if (err)
234 goto out; 234 goto out;
235 235
@@ -396,7 +396,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
396 396
397 for (i = 1; i <= dev_cap->num_ports; ++i) { 397 for (i = 1; i <= dev_cap->num_ports; ++i) {
398 err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, 398 err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT,
399 MLX4_CMD_TIME_CLASS_B); 399 MLX4_CMD_TIME_CLASS_B,
400 !mlx4_is_slave(dev));
400 if (err) 401 if (err)
401 goto out; 402 goto out;
402 403
@@ -519,7 +520,8 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u16 op, struct mlx4_icm *icm, u64 virt)
519 520
520 if (++nent == MLX4_MAILBOX_SIZE / 16) { 521 if (++nent == MLX4_MAILBOX_SIZE / 16) {
521 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op, 522 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op,
522 MLX4_CMD_TIME_CLASS_B); 523 MLX4_CMD_TIME_CLASS_B,
524 MLX4_CMD_NATIVE);
523 if (err) 525 if (err)
524 goto out; 526 goto out;
525 nent = 0; 527 nent = 0;
@@ -528,7 +530,8 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u16 op, struct mlx4_icm *icm, u64 virt)
528 } 530 }
529 531
530 if (nent) 532 if (nent)
531 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op, MLX4_CMD_TIME_CLASS_B); 533 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op,
534 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
532 if (err) 535 if (err)
533 goto out; 536 goto out;
534 537
@@ -557,13 +560,15 @@ int mlx4_MAP_FA(struct mlx4_dev *dev, struct mlx4_icm *icm)
557 560
558int mlx4_UNMAP_FA(struct mlx4_dev *dev) 561int mlx4_UNMAP_FA(struct mlx4_dev *dev)
559{ 562{
560 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_FA, MLX4_CMD_TIME_CLASS_B); 563 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_FA,
564 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
561} 565}
562 566
563 567
564int mlx4_RUN_FW(struct mlx4_dev *dev) 568int mlx4_RUN_FW(struct mlx4_dev *dev)
565{ 569{
566 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_RUN_FW, MLX4_CMD_TIME_CLASS_A); 570 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_RUN_FW,
571 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
567} 572}
568 573
569int mlx4_QUERY_FW(struct mlx4_dev *dev) 574int mlx4_QUERY_FW(struct mlx4_dev *dev)
@@ -595,7 +600,7 @@ int mlx4_QUERY_FW(struct mlx4_dev *dev)
595 outbox = mailbox->buf; 600 outbox = mailbox->buf;
596 601
597 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_FW, 602 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_FW,
598 MLX4_CMD_TIME_CLASS_A); 603 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
599 if (err) 604 if (err)
600 goto out; 605 goto out;
601 606
@@ -711,7 +716,7 @@ int mlx4_QUERY_ADAPTER(struct mlx4_dev *dev, struct mlx4_adapter *adapter)
711 outbox = mailbox->buf; 716 outbox = mailbox->buf;
712 717
713 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_ADAPTER, 718 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_ADAPTER,
714 MLX4_CMD_TIME_CLASS_A); 719 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
715 if (err) 720 if (err)
716 goto out; 721 goto out;
717 722
@@ -834,7 +839,8 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
834 MLX4_PUT(inbox, (u8) (PAGE_SHIFT - 12), INIT_HCA_UAR_PAGE_SZ_OFFSET); 839 MLX4_PUT(inbox, (u8) (PAGE_SHIFT - 12), INIT_HCA_UAR_PAGE_SZ_OFFSET);
835 MLX4_PUT(inbox, param->log_uar_sz, INIT_HCA_LOG_UAR_SZ_OFFSET); 840 MLX4_PUT(inbox, param->log_uar_sz, INIT_HCA_LOG_UAR_SZ_OFFSET);
836 841
837 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_INIT_HCA, 10000); 842 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_INIT_HCA, 10000,
843 MLX4_CMD_NATIVE);
838 844
839 if (err) 845 if (err)
840 mlx4_err(dev, "INIT_HCA returns %d\n", err); 846 mlx4_err(dev, "INIT_HCA returns %d\n", err);
@@ -886,12 +892,12 @@ int mlx4_INIT_PORT(struct mlx4_dev *dev, int port)
886 MLX4_PUT(inbox, field, INIT_PORT_MAX_PKEY_OFFSET); 892 MLX4_PUT(inbox, field, INIT_PORT_MAX_PKEY_OFFSET);
887 893
888 err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_INIT_PORT, 894 err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_INIT_PORT,
889 MLX4_CMD_TIME_CLASS_A); 895 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
890 896
891 mlx4_free_cmd_mailbox(dev, mailbox); 897 mlx4_free_cmd_mailbox(dev, mailbox);
892 } else 898 } else
893 err = mlx4_cmd(dev, 0, port, 0, MLX4_CMD_INIT_PORT, 899 err = mlx4_cmd(dev, 0, port, 0, MLX4_CMD_INIT_PORT,
894 MLX4_CMD_TIME_CLASS_A); 900 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
895 901
896 return err; 902 return err;
897} 903}
@@ -899,20 +905,22 @@ EXPORT_SYMBOL_GPL(mlx4_INIT_PORT);
899 905
900int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port) 906int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port)
901{ 907{
902 return mlx4_cmd(dev, 0, port, 0, MLX4_CMD_CLOSE_PORT, 1000); 908 return mlx4_cmd(dev, 0, port, 0, MLX4_CMD_CLOSE_PORT, 1000,
909 MLX4_CMD_WRAPPED);
903} 910}
904EXPORT_SYMBOL_GPL(mlx4_CLOSE_PORT); 911EXPORT_SYMBOL_GPL(mlx4_CLOSE_PORT);
905 912
906int mlx4_CLOSE_HCA(struct mlx4_dev *dev, int panic) 913int mlx4_CLOSE_HCA(struct mlx4_dev *dev, int panic)
907{ 914{
908 return mlx4_cmd(dev, 0, 0, panic, MLX4_CMD_CLOSE_HCA, 1000); 915 return mlx4_cmd(dev, 0, 0, panic, MLX4_CMD_CLOSE_HCA, 1000,
916 MLX4_CMD_NATIVE);
909} 917}
910 918
911int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages) 919int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages)
912{ 920{
913 int ret = mlx4_cmd_imm(dev, icm_size, aux_pages, 0, 0, 921 int ret = mlx4_cmd_imm(dev, icm_size, aux_pages, 0, 0,
914 MLX4_CMD_SET_ICM_SIZE, 922 MLX4_CMD_SET_ICM_SIZE,
915 MLX4_CMD_TIME_CLASS_A); 923 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
916 if (ret) 924 if (ret)
917 return ret; 925 return ret;
918 926
@@ -929,7 +937,7 @@ int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages)
929int mlx4_NOP(struct mlx4_dev *dev) 937int mlx4_NOP(struct mlx4_dev *dev)
930{ 938{
931 /* Input modifier of 0x1f means "finish as soon as possible." */ 939 /* Input modifier of 0x1f means "finish as soon as possible." */
932 return mlx4_cmd(dev, 0, 0x1f, 0, MLX4_CMD_NOP, 100); 940 return mlx4_cmd(dev, 0, 0x1f, 0, MLX4_CMD_NOP, 100, MLX4_CMD_NATIVE);
933} 941}
934 942
935#define MLX4_WOL_SETUP_MODE (5 << 28) 943#define MLX4_WOL_SETUP_MODE (5 << 28)
@@ -938,7 +946,8 @@ int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port)
938 u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8; 946 u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8;
939 947
940 return mlx4_cmd_imm(dev, 0, config, in_mod, 0x3, 948 return mlx4_cmd_imm(dev, 0, config, in_mod, 0x3,
941 MLX4_CMD_MOD_STAT_CFG, MLX4_CMD_TIME_CLASS_A); 949 MLX4_CMD_MOD_STAT_CFG, MLX4_CMD_TIME_CLASS_A,
950 MLX4_CMD_NATIVE);
942} 951}
943EXPORT_SYMBOL_GPL(mlx4_wol_read); 952EXPORT_SYMBOL_GPL(mlx4_wol_read);
944 953
@@ -947,6 +956,6 @@ int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port)
947 u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8; 956 u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8;
948 957
949 return mlx4_cmd(dev, config, in_mod, 0x1, MLX4_CMD_MOD_STAT_CFG, 958 return mlx4_cmd(dev, config, in_mod, 0x1, MLX4_CMD_MOD_STAT_CFG,
950 MLX4_CMD_TIME_CLASS_A); 959 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
951} 960}
952EXPORT_SYMBOL_GPL(mlx4_wol_write); 961EXPORT_SYMBOL_GPL(mlx4_wol_write);
diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c
index 02393fdf44c1..a9ade1c3cad5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/icm.c
+++ b/drivers/net/ethernet/mellanox/mlx4/icm.c
@@ -213,7 +213,7 @@ static int mlx4_MAP_ICM(struct mlx4_dev *dev, struct mlx4_icm *icm, u64 virt)
213static int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count) 213static int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count)
214{ 214{
215 return mlx4_cmd(dev, virt, page_count, 0, MLX4_CMD_UNMAP_ICM, 215 return mlx4_cmd(dev, virt, page_count, 0, MLX4_CMD_UNMAP_ICM,
216 MLX4_CMD_TIME_CLASS_B); 216 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
217} 217}
218 218
219int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm) 219int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm)
@@ -223,7 +223,8 @@ int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm)
223 223
224int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev) 224int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev)
225{ 225{
226 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_ICM_AUX, MLX4_CMD_TIME_CLASS_B); 226 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_ICM_AUX,
227 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
227} 228}
228 229
229int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, int obj) 230int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, int obj)
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index 978688c31046..4187f7bbd793 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -48,14 +48,14 @@ static int mlx4_READ_ENTRY(struct mlx4_dev *dev, int index,
48 struct mlx4_cmd_mailbox *mailbox) 48 struct mlx4_cmd_mailbox *mailbox)
49{ 49{
50 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG, 50 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG,
51 MLX4_CMD_TIME_CLASS_A); 51 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
52} 52}
53 53
54static int mlx4_WRITE_ENTRY(struct mlx4_dev *dev, int index, 54static int mlx4_WRITE_ENTRY(struct mlx4_dev *dev, int index,
55 struct mlx4_cmd_mailbox *mailbox) 55 struct mlx4_cmd_mailbox *mailbox)
56{ 56{
57 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG, 57 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG,
58 MLX4_CMD_TIME_CLASS_A); 58 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
59} 59}
60 60
61static int mlx4_WRITE_PROMISC(struct mlx4_dev *dev, u8 vep_num, u8 port, u8 steer, 61static int mlx4_WRITE_PROMISC(struct mlx4_dev *dev, u8 vep_num, u8 port, u8 steer,
@@ -65,7 +65,8 @@ static int mlx4_WRITE_PROMISC(struct mlx4_dev *dev, u8 vep_num, u8 port, u8 stee
65 65
66 in_mod = (u32) vep_num << 24 | (u32) port << 16 | steer << 1; 66 in_mod = (u32) vep_num << 24 | (u32) port << 16 | steer << 1;
67 return mlx4_cmd(dev, mailbox->dma, in_mod, 0x1, 67 return mlx4_cmd(dev, mailbox->dma, in_mod, 0x1,
68 MLX4_CMD_WRITE_MCG, MLX4_CMD_TIME_CLASS_A); 68 MLX4_CMD_WRITE_MCG, MLX4_CMD_TIME_CLASS_A,
69 MLX4_CMD_NATIVE);
69} 70}
70 71
71static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 72static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
@@ -75,7 +76,8 @@ static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
75 int err; 76 int err;
76 77
77 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, 0, op_mod, 78 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, 0, op_mod,
78 MLX4_CMD_MGID_HASH, MLX4_CMD_TIME_CLASS_A); 79 MLX4_CMD_MGID_HASH, MLX4_CMD_TIME_CLASS_A,
80 MLX4_CMD_NATIVE);
79 81
80 if (!err) 82 if (!err)
81 *hash = imm; 83 *hash = imm;
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
index efa3e77355e4..057b22d64a05 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
@@ -254,14 +254,15 @@ static int mlx4_SW2HW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox
254 int mpt_index) 254 int mpt_index)
255{ 255{
256 return mlx4_cmd(dev, mailbox->dma, mpt_index, 0, MLX4_CMD_SW2HW_MPT, 256 return mlx4_cmd(dev, mailbox->dma, mpt_index, 0, MLX4_CMD_SW2HW_MPT,
257 MLX4_CMD_TIME_CLASS_B); 257 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
258} 258}
259 259
260static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 260static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
261 int mpt_index) 261 int mpt_index)
262{ 262{
263 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, mpt_index, 263 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, mpt_index,
264 !mailbox, MLX4_CMD_HW2SW_MPT, MLX4_CMD_TIME_CLASS_B); 264 !mailbox, MLX4_CMD_HW2SW_MPT,
265 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
265} 266}
266 267
267int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, 268int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access,
@@ -663,6 +664,7 @@ EXPORT_SYMBOL_GPL(mlx4_fmr_free);
663 664
664int mlx4_SYNC_TPT(struct mlx4_dev *dev) 665int mlx4_SYNC_TPT(struct mlx4_dev *dev)
665{ 666{
666 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_SYNC_TPT, 1000); 667 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_SYNC_TPT, 1000,
668 MLX4_CMD_WRAPPED);
667} 669}
668EXPORT_SYMBOL_GPL(mlx4_SYNC_TPT); 670EXPORT_SYMBOL_GPL(mlx4_SYNC_TPT);
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c
index d942aea4927b..da9f85c6da7e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/port.c
+++ b/drivers/net/ethernet/mellanox/mlx4/port.c
@@ -85,7 +85,7 @@ static int mlx4_set_port_mac_table(struct mlx4_dev *dev, u8 port,
85 85
86 in_mod = MLX4_SET_PORT_MAC_TABLE << 8 | port; 86 in_mod = MLX4_SET_PORT_MAC_TABLE << 8 | port;
87 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, 87 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT,
88 MLX4_CMD_TIME_CLASS_B); 88 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
89 89
90 mlx4_free_cmd_mailbox(dev, mailbox); 90 mlx4_free_cmd_mailbox(dev, mailbox);
91 return err; 91 return err;
@@ -326,7 +326,7 @@ static int mlx4_set_port_vlan_table(struct mlx4_dev *dev, u8 port,
326 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE); 326 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE);
327 in_mod = MLX4_SET_PORT_VLAN_TABLE << 8 | port; 327 in_mod = MLX4_SET_PORT_VLAN_TABLE << 8 | port;
328 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, 328 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT,
329 MLX4_CMD_TIME_CLASS_B); 329 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
330 330
331 mlx4_free_cmd_mailbox(dev, mailbox); 331 mlx4_free_cmd_mailbox(dev, mailbox);
332 332
@@ -462,7 +462,8 @@ int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps)
462 *(__be32 *) (&inbuf[20]) = cpu_to_be32(port); 462 *(__be32 *) (&inbuf[20]) = cpu_to_be32(port);
463 463
464 err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3, 464 err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3,
465 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); 465 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C,
466 MLX4_CMD_NATIVE);
466 if (!err) 467 if (!err)
467 *caps = *(__be32 *) (outbuf + 84); 468 *caps = *(__be32 *) (outbuf + 84);
468 mlx4_free_cmd_mailbox(dev, inmailbox); 469 mlx4_free_cmd_mailbox(dev, inmailbox);
@@ -499,7 +500,8 @@ int mlx4_check_ext_port_caps(struct mlx4_dev *dev, u8 port)
499 *(__be32 *) (&inbuf[20]) = cpu_to_be32(port); 500 *(__be32 *) (&inbuf[20]) = cpu_to_be32(port);
500 501
501 err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3, 502 err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3,
502 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); 503 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C,
504 MLX4_CMD_NATIVE);
503 505
504 packet_error = be16_to_cpu(*(__be16 *) (outbuf + 4)); 506 packet_error = be16_to_cpu(*(__be16 *) (outbuf + 4));
505 507
@@ -528,7 +530,7 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
528 530
529 ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; 531 ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
530 err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT, 532 err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT,
531 MLX4_CMD_TIME_CLASS_B); 533 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
532 534
533 mlx4_free_cmd_mailbox(dev, mailbox); 535 mlx4_free_cmd_mailbox(dev, mailbox);
534 return err; 536 return err;
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
index 15f870cb2590..e721f4cd34f8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
@@ -119,7 +119,8 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
119 119
120 if (op[cur_state][new_state] == MLX4_CMD_2RST_QP) 120 if (op[cur_state][new_state] == MLX4_CMD_2RST_QP)
121 return mlx4_cmd(dev, 0, qp->qpn, 2, 121 return mlx4_cmd(dev, 0, qp->qpn, 2,
122 MLX4_CMD_2RST_QP, MLX4_CMD_TIME_CLASS_A); 122 MLX4_CMD_2RST_QP, MLX4_CMD_TIME_CLASS_A,
123 MLX4_CMD_WRAPPED);
123 124
124 mailbox = mlx4_alloc_cmd_mailbox(dev); 125 mailbox = mlx4_alloc_cmd_mailbox(dev);
125 if (IS_ERR(mailbox)) 126 if (IS_ERR(mailbox))
@@ -140,7 +141,8 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
140 141
141 ret = mlx4_cmd(dev, mailbox->dma, qp->qpn | (!!sqd_event << 31), 142 ret = mlx4_cmd(dev, mailbox->dma, qp->qpn | (!!sqd_event << 31),
142 new_state == MLX4_QP_STATE_RST ? 2 : 0, 143 new_state == MLX4_QP_STATE_RST ? 2 : 0,
143 op[cur_state][new_state], MLX4_CMD_TIME_CLASS_C); 144 op[cur_state][new_state], MLX4_CMD_TIME_CLASS_C,
145 MLX4_CMD_WRAPPED);
144 146
145 mlx4_free_cmd_mailbox(dev, mailbox); 147 mlx4_free_cmd_mailbox(dev, mailbox);
146 return ret; 148 return ret;
@@ -265,7 +267,7 @@ EXPORT_SYMBOL_GPL(mlx4_qp_free);
265static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn) 267static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn)
266{ 268{
267 return mlx4_cmd(dev, 0, base_qpn, 0, MLX4_CMD_CONF_SPECIAL_QP, 269 return mlx4_cmd(dev, 0, base_qpn, 0, MLX4_CMD_CONF_SPECIAL_QP,
268 MLX4_CMD_TIME_CLASS_B); 270 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
269} 271}
270 272
271int mlx4_init_qp_table(struct mlx4_dev *dev) 273int mlx4_init_qp_table(struct mlx4_dev *dev)
@@ -342,7 +344,8 @@ int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp,
342 return PTR_ERR(mailbox); 344 return PTR_ERR(mailbox);
343 345
344 err = mlx4_cmd_box(dev, 0, mailbox->dma, qp->qpn, 0, 346 err = mlx4_cmd_box(dev, 0, mailbox->dma, qp->qpn, 0,
345 MLX4_CMD_QUERY_QP, MLX4_CMD_TIME_CLASS_A); 347 MLX4_CMD_QUERY_QP, MLX4_CMD_TIME_CLASS_A,
348 MLX4_CMD_WRAPPED);
346 if (!err) 349 if (!err)
347 memcpy(context, mailbox->buf + 8, sizeof *context); 350 memcpy(context, mailbox->buf + 8, sizeof *context);
348 351
diff --git a/drivers/net/ethernet/mellanox/mlx4/sense.c b/drivers/net/ethernet/mellanox/mlx4/sense.c
index e2337a7411d9..802498293528 100644
--- a/drivers/net/ethernet/mellanox/mlx4/sense.c
+++ b/drivers/net/ethernet/mellanox/mlx4/sense.c
@@ -45,7 +45,8 @@ int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
45 int err = 0; 45 int err = 0;
46 46
47 err = mlx4_cmd_imm(dev, 0, &out_param, port, 0, 47 err = mlx4_cmd_imm(dev, 0, &out_param, port, 0,
48 MLX4_CMD_SENSE_PORT, MLX4_CMD_TIME_CLASS_B); 48 MLX4_CMD_SENSE_PORT, MLX4_CMD_TIME_CLASS_B,
49 MLX4_CMD_WRAPPED);
49 if (err) { 50 if (err) {
50 mlx4_err(dev, "Sense command failed for port: %d\n", port); 51 mlx4_err(dev, "Sense command failed for port: %d\n", port);
51 return err; 52 return err;
diff --git a/drivers/net/ethernet/mellanox/mlx4/srq.c b/drivers/net/ethernet/mellanox/mlx4/srq.c
index 9cbf3fce0145..f4ca096db62a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/srq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/srq.c
@@ -86,7 +86,7 @@ static int mlx4_SW2HW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox
86 int srq_num) 86 int srq_num)
87{ 87{
88 return mlx4_cmd(dev, mailbox->dma, srq_num, 0, MLX4_CMD_SW2HW_SRQ, 88 return mlx4_cmd(dev, mailbox->dma, srq_num, 0, MLX4_CMD_SW2HW_SRQ,
89 MLX4_CMD_TIME_CLASS_A); 89 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
90} 90}
91 91
92static int mlx4_HW2SW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 92static int mlx4_HW2SW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
@@ -94,20 +94,20 @@ static int mlx4_HW2SW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox
94{ 94{
95 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, srq_num, 95 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, srq_num,
96 mailbox ? 0 : 1, MLX4_CMD_HW2SW_SRQ, 96 mailbox ? 0 : 1, MLX4_CMD_HW2SW_SRQ,
97 MLX4_CMD_TIME_CLASS_A); 97 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
98} 98}
99 99
100static int mlx4_ARM_SRQ(struct mlx4_dev *dev, int srq_num, int limit_watermark) 100static int mlx4_ARM_SRQ(struct mlx4_dev *dev, int srq_num, int limit_watermark)
101{ 101{
102 return mlx4_cmd(dev, limit_watermark, srq_num, 0, MLX4_CMD_ARM_SRQ, 102 return mlx4_cmd(dev, limit_watermark, srq_num, 0, MLX4_CMD_ARM_SRQ,
103 MLX4_CMD_TIME_CLASS_B); 103 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
104} 104}
105 105
106static int mlx4_QUERY_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 106static int mlx4_QUERY_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
107 int srq_num) 107 int srq_num)
108{ 108{
109 return mlx4_cmd_box(dev, 0, mailbox->dma, srq_num, 0, MLX4_CMD_QUERY_SRQ, 109 return mlx4_cmd_box(dev, 0, mailbox->dma, srq_num, 0, MLX4_CMD_QUERY_SRQ,
110 MLX4_CMD_TIME_CLASS_A); 110 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED);
111} 111}
112 112
113int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcd, 113int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcd,