]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/core/cm_msgs.h
IB: Remove __constant_{endian} uses
[linux-2.6-omap-h63xx.git] / drivers / infiniband / core / cm_msgs.h
index 807a9fbb38f5993441758d1134d652414d4fb390..7e63c08f697c33f3dcbd806a9a122cae1867c3cb 100644 (file)
@@ -34,7 +34,8 @@
 #if !defined(CM_MSGS_H)
 #define CM_MSGS_H
 
-#include <ib_mad.h>
+#include <rdma/ib_mad.h>
+#include <rdma/ib_cm.h>
 
 /*
  * Parameters to routines below should be in network-byte order, and values
 
 #define IB_CM_CLASS_VERSION    2 /* IB specification 1.2 */
 
-#define CM_REQ_ATTR_ID     __constant_htons(0x0010)
-#define CM_MRA_ATTR_ID     __constant_htons(0x0011)
-#define CM_REJ_ATTR_ID     __constant_htons(0x0012)
-#define CM_REP_ATTR_ID     __constant_htons(0x0013)
-#define CM_RTU_ATTR_ID     __constant_htons(0x0014)
-#define CM_DREQ_ATTR_ID            __constant_htons(0x0015)
-#define CM_DREP_ATTR_ID            __constant_htons(0x0016)
-#define CM_SIDR_REQ_ATTR_ID __constant_htons(0x0017)
-#define CM_SIDR_REP_ATTR_ID __constant_htons(0x0018)
-#define CM_LAP_ATTR_ID      __constant_htons(0x0019)
-#define CM_APR_ATTR_ID      __constant_htons(0x001A)
+#define CM_REQ_ATTR_ID         cpu_to_be16(0x0010)
+#define CM_MRA_ATTR_ID         cpu_to_be16(0x0011)
+#define CM_REJ_ATTR_ID         cpu_to_be16(0x0012)
+#define CM_REP_ATTR_ID         cpu_to_be16(0x0013)
+#define CM_RTU_ATTR_ID         cpu_to_be16(0x0014)
+#define CM_DREQ_ATTR_ID                cpu_to_be16(0x0015)
+#define CM_DREP_ATTR_ID                cpu_to_be16(0x0016)
+#define CM_SIDR_REQ_ATTR_ID    cpu_to_be16(0x0017)
+#define CM_SIDR_REP_ATTR_ID    cpu_to_be16(0x0018)
+#define CM_LAP_ATTR_ID         cpu_to_be16(0x0019)
+#define CM_APR_ATTR_ID         cpu_to_be16(0x001A)
 
 enum cm_msg_sequence {
        CM_MSG_SEQUENCE_REQ,
@@ -186,6 +187,7 @@ static inline void cm_req_set_qp_type(struct cm_req_msg *req_msg,
                req_msg->offset40 = cpu_to_be32((be32_to_cpu(
                                                  req_msg->offset40) &
                                                   0xFFFFFFF9) | 0x2);
+               break;
        default:
                req_msg->offset40 = cpu_to_be32(be32_to_cpu(
                                                 req_msg->offset40) &