]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ehca: Use named constant for max mtu
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>
Sun, 5 Nov 2006 20:42:56 +0000 (21:42 +0100)
committerRoland Dreier <rolandd@cisco.com>
Mon, 13 Nov 2006 16:46:28 +0000 (08:46 -0800)
Define and use a constant EHCA_MAX_MTU instead hardcoded value.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_av.c
drivers/infiniband/hw/ehca/hipz_hw.h

index 3bac197f90141d488f806f07100874afa5d7f491..214e2fdddeef0792572aaf0fcd333aa1ae94016b 100644 (file)
@@ -118,8 +118,7 @@ struct ib_ah *ehca_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
                }
                memcpy(&av->av.grh.word_1, &gid, sizeof(gid));
        }
-       /* for the time being we use a hard coded PMTU of 2048 Bytes */
-       av->av.pmtu = 4;
+       av->av.pmtu = EHCA_MAX_MTU;
 
        /* dgid comes in grh.word_3 */
        memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid,
@@ -193,7 +192,7 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
                memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid));
        }
 
-       new_ehca_av.pmtu = 4; /* see also comment in create_ah() */
+       new_ehca_av.pmtu = EHCA_MAX_MTU;
 
        memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid,
               sizeof(ah_attr->grh.dgid));
index 3fc92b031c50c3fbbc9d691fe9072767956baed9..fad91368dc5a7893237c3acebbf5eefa443aad28 100644 (file)
@@ -45,6 +45,8 @@
 
 #include "ehca_tools.h"
 
+#define EHCA_MAX_MTU 4
+
 /* QP Table Entry Memory Map */
 struct hipz_qptemm {
        u64 qpx_hcr;