[MTHCA] fixed bugs in modify_QP, mostly related to RDMA
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Apr 2006 13:48:51 +0000 (13:48 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Apr 2006 13:48:51 +0000 (13:48 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@303 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/kernel/hca_data.c

index 1fea7e8..26dfdb6 100644 (file)
@@ -527,7 +527,7 @@ mlnx_conv_qp_modify_attr(
                                // IB_QP_ACCESS_FLAGS: Convert Remote Atomic Flags\r
                                if (modify_attr_p->state.rtr.opts & IB_MOD_QP_ACCESS_CTRL) {\r
                                        *qp_attr_mask_p |= IB_QP_ACCESS_FLAGS;          /* optional flag */\r
-                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.init.access_ctrl);\r
+                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.rtr.access_ctrl);\r
                                }\r
 \r
                                // IB_QP_ALT_PATH: Convert alternate RC AV\r
@@ -573,7 +573,7 @@ mlnx_conv_qp_modify_attr(
                                // IB_QP_ACCESS_FLAGS: Convert Remote Atomic Flags\r
                                if (modify_attr_p->state.rtr.opts & IB_MOD_QP_ACCESS_CTRL) {\r
                                        *qp_attr_mask_p |= IB_QP_ACCESS_FLAGS;          /* optional flag */\r
-                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.init.access_ctrl);\r
+                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.rtr.access_ctrl);\r
                                }\r
 \r
                                // IB_QP_ALT_PATH: Convert alternate RC AV\r
@@ -652,20 +652,20 @@ mlnx_conv_qp_modify_attr(
                // Linux patch 4793: PKEY_INDEX is not a legal parameter in the RTR->RTS transition.\r
 \r
                                // IB_QP_PKEY_INDEX \r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_PKEY) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_PKEY) {\r
                                        *qp_attr_mask_p |= IB_QP_PKEY_INDEX;    \r
                                        qp_attr_p->pkey_index = modify_attr_p->state.rts.pkey_index;\r
                                }\r
 #endif                         \r
 \r
                                // IB_QP_MIN_RNR_TIMER\r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_RNR_NAK_TIMEOUT) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_RNR_NAK_TIMEOUT) {\r
                                        *qp_attr_mask_p |= IB_QP_MIN_RNR_TIMER; \r
                                        qp_attr_p->min_rnr_timer         = modify_attr_p->state.rts.rnr_nak_timeout;\r
                                }\r
 \r
                                // IB_QP_PATH_MIG_STATE\r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_APM_STATE) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
                                        *qp_attr_mask_p |= IB_QP_PATH_MIG_STATE;        \r
                                        qp_attr_p->path_mig_state =  modify_attr_p->state.rts.apm_state;\r
                                }\r
@@ -673,7 +673,7 @@ mlnx_conv_qp_modify_attr(
                                // IB_QP_ACCESS_FLAGS\r
                                if (modify_attr_p->state.rts.opts & IB_MOD_QP_ACCESS_CTRL) {\r
                                        *qp_attr_mask_p |= IB_QP_ACCESS_FLAGS;          /* optional flags */\r
-                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.init.access_ctrl);\r
+                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.rts.access_ctrl);\r
                                }\r
 \r
                                // IB_QP_ALT_PATH: Convert alternate RC AV\r
@@ -704,14 +704,14 @@ mlnx_conv_qp_modify_attr(
                // Linux patch 4793: PKEY_INDEX is not a legal parameter in the RTR->RTS transition.\r
 \r
                                // IB_QP_PKEY_INDEX \r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_PKEY) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_PKEY) {\r
                                        *qp_attr_mask_p |= IB_QP_PKEY_INDEX;    \r
                                        qp_attr_p->pkey_index = modify_attr_p->state.rts.pkey_index;\r
                                }\r
 #endif                         \r
 \r
                                // IB_QP_PATH_MIG_STATE\r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_APM_STATE) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
                                        *qp_attr_mask_p |= IB_QP_PATH_MIG_STATE;        \r
                                        qp_attr_p->path_mig_state =  modify_attr_p->state.rts.apm_state;\r
                                }\r
@@ -719,7 +719,7 @@ mlnx_conv_qp_modify_attr(
                                // IB_QP_ACCESS_FLAGS\r
                                if (modify_attr_p->state.rts.opts & IB_MOD_QP_ACCESS_CTRL) {\r
                                        *qp_attr_mask_p |= IB_QP_ACCESS_FLAGS;          /* optional flags */\r
-                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.init.access_ctrl);\r
+                                       qp_attr_p->qp_access_flags = map_qp_ibal_acl(modify_attr_p->state.rts.access_ctrl);\r
                                }\r
 \r
                                // IB_QP_ALT_PATH: Convert alternate RC AV\r
@@ -742,9 +742,9 @@ mlnx_conv_qp_modify_attr(
                                        IB_QP_SQ_PSN;\r
 \r
                                // IB_QP_QKEY\r
-                               if (modify_attr_p->state.rtr.opts & IB_MOD_QP_QKEY) {\r
+                               if (modify_attr_p->state.rts.opts & IB_MOD_QP_QKEY) {\r
                                        *qp_attr_mask_p |= IB_QP_QKEY;  \r
-                                       qp_attr_p->qkey          = cl_ntoh32 (modify_attr_p->state.rtr.qkey);\r
+                                       qp_attr_p->qkey          = cl_ntoh32 (modify_attr_p->state.rts.qkey);\r
                                }\r
                                break;\r
                                \r