aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
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
commitd3809ad0972297fbc7ef0585049ef465d9d8d79d (patch)
treea565a23430de36a1b8f49cc9cf5267efc65218a7 /drivers/infiniband
parente5a5e7d59af5944a674b9cea420a1fedc60496f2 (diff)
IB/mthca: Remove extra code for RESET->ERR QP state transition
Commit b18aad71 ("IB/mthca: Fix RESET to ERROR transition") 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/infiniband')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 3b1c5baf13b..77b52b3adcc 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -848,23 +848,6 @@ out:
848 return err; 848 return err;
849} 849}
850 850
851static const struct ib_qp_attr dummy_init_attr = { .port_num = 1 };
852static const int dummy_init_attr_mask[] = {
853 [IB_QPT_UD] = (IB_QP_PKEY_INDEX |
854 IB_QP_PORT |
855 IB_QP_QKEY),
856 [IB_QPT_UC] = (IB_QP_PKEY_INDEX |
857 IB_QP_PORT |
858 IB_QP_ACCESS_FLAGS),
859 [IB_QPT_RC] = (IB_QP_PKEY_INDEX |
860 IB_QP_PORT |
861 IB_QP_ACCESS_FLAGS),
862 [IB_QPT_SMI] = (IB_QP_PKEY_INDEX |
863 IB_QP_QKEY),
864 [IB_QPT_GSI] = (IB_QP_PKEY_INDEX |
865 IB_QP_QKEY),
866};
867
868int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, 851int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
869 struct ib_udata *udata) 852 struct ib_udata *udata)
870{ 853{
@@ -926,15 +909,6 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
926 goto out; 909 goto out;
927 } 910 }
928 911
929 if (cur_state == IB_QPS_RESET && new_state == IB_QPS_ERR) {
930 err = __mthca_modify_qp(ibqp, &dummy_init_attr,
931 dummy_init_attr_mask[ibqp->qp_type],
932 IB_QPS_RESET, IB_QPS_INIT);
933 if (err)
934 goto out;
935 cur_state = IB_QPS_INIT;
936 }
937
938 err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state); 912 err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state);
939 913
940out: 914out: