aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:46 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:46 -0400
commit7c27f358209a8ce7c57b584346d7b611e823f1b1 (patch)
tree2978eba94e5b3a7e64086291c58c9dff8a7d231b /drivers
parentd3809ad0972297fbc7ef0585049ef465d9d8d79d (diff)
IB/mlx4: Remove extra code for RESET->ERR QP state transition
Commit 65adfa91 ("IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions") added some extra code to handle a QP state transition from RESET to ERROR. However, the latest 1.2.1 version of the IB spec has clarified that this transition is actually not allowed, so we can remove this extra code again. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 76054a72f71b..44bbd6c2e315 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1132,23 +1132,6 @@ out:
1132 return err; 1132 return err;
1133} 1133}
1134 1134
1135static const struct ib_qp_attr mlx4_ib_qp_attr = { .port_num = 1 };
1136static const int mlx4_ib_qp_attr_mask_table[IB_QPT_UD + 1] = {
1137 [IB_QPT_UD] = (IB_QP_PKEY_INDEX |
1138 IB_QP_PORT |
1139 IB_QP_QKEY),
1140 [IB_QPT_UC] = (IB_QP_PKEY_INDEX |
1141 IB_QP_PORT |
1142 IB_QP_ACCESS_FLAGS),
1143 [IB_QPT_RC] = (IB_QP_PKEY_INDEX |
1144 IB_QP_PORT |
1145 IB_QP_ACCESS_FLAGS),
1146 [IB_QPT_SMI] = (IB_QP_PKEY_INDEX |
1147 IB_QP_QKEY),
1148 [IB_QPT_GSI] = (IB_QP_PKEY_INDEX |
1149 IB_QP_QKEY),
1150};
1151
1152int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, 1135int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1153 int attr_mask, struct ib_udata *udata) 1136 int attr_mask, struct ib_udata *udata)
1154{ 1137{
@@ -1191,15 +1174,6 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1191 goto out; 1174 goto out;
1192 } 1175 }
1193 1176
1194 if (cur_state == IB_QPS_RESET && new_state == IB_QPS_ERR) {
1195 err = __mlx4_ib_modify_qp(ibqp, &mlx4_ib_qp_attr,
1196 mlx4_ib_qp_attr_mask_table[ibqp->qp_type],
1197 IB_QPS_RESET, IB_QPS_INIT);
1198 if (err)
1199 goto out;
1200 cur_state = IB_QPS_INIT;
1201 }
1202
1203 err = __mlx4_ib_modify_qp(ibqp, attr, attr_mask, cur_state, new_state); 1177 err = __mlx4_ib_modify_qp(ibqp, attr, attr_mask, cur_state, new_state);
1204 1178
1205out: 1179out: