diff options
author | Sean Hefty <sean.hefty@intel.com> | 2005-08-14 00:05:57 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-08-26 23:37:35 -0400 |
commit | 97f52eb438be7caebe026421545619d8a0c1398a (patch) | |
tree | 1085acb833b691e9cc7ef607e4b4ac8cbd81e03f /drivers/infiniband/include | |
parent | 92a6b34bf4d0d11c54b2a6bdd6240f98cb326200 (diff) |
[PATCH] IB: sparse endianness cleanup
Fix sparse warnings. Use __be* where appropriate.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/include')
-rw-r--r-- | drivers/infiniband/include/ib_cm.h | 89 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_mad.h | 22 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_sa.h | 18 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_smi.h | 18 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_user_cm.h | 28 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_user_mad.h | 10 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_user_verbs.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_verbs.h | 14 |
8 files changed, 100 insertions, 103 deletions
diff --git a/drivers/infiniband/include/ib_cm.h b/drivers/infiniband/include/ib_cm.h index da650115e79a..8202ad2e6435 100644 --- a/drivers/infiniband/include/ib_cm.h +++ b/drivers/infiniband/include/ib_cm.h | |||
@@ -115,7 +115,7 @@ struct ib_cm_req_event_param { | |||
115 | struct ib_sa_path_rec *primary_path; | 115 | struct ib_sa_path_rec *primary_path; |
116 | struct ib_sa_path_rec *alternate_path; | 116 | struct ib_sa_path_rec *alternate_path; |
117 | 117 | ||
118 | u64 remote_ca_guid; | 118 | __be64 remote_ca_guid; |
119 | u32 remote_qkey; | 119 | u32 remote_qkey; |
120 | u32 remote_qpn; | 120 | u32 remote_qpn; |
121 | enum ib_qp_type qp_type; | 121 | enum ib_qp_type qp_type; |
@@ -132,7 +132,7 @@ struct ib_cm_req_event_param { | |||
132 | }; | 132 | }; |
133 | 133 | ||
134 | struct ib_cm_rep_event_param { | 134 | struct ib_cm_rep_event_param { |
135 | u64 remote_ca_guid; | 135 | __be64 remote_ca_guid; |
136 | u32 remote_qkey; | 136 | u32 remote_qkey; |
137 | u32 remote_qpn; | 137 | u32 remote_qpn; |
138 | u32 starting_psn; | 138 | u32 starting_psn; |
@@ -146,39 +146,39 @@ struct ib_cm_rep_event_param { | |||
146 | }; | 146 | }; |
147 | 147 | ||
148 | enum ib_cm_rej_reason { | 148 | enum ib_cm_rej_reason { |
149 | IB_CM_REJ_NO_QP = __constant_htons(1), | 149 | IB_CM_REJ_NO_QP = 1, |
150 | IB_CM_REJ_NO_EEC = __constant_htons(2), | 150 | IB_CM_REJ_NO_EEC = 2, |
151 | IB_CM_REJ_NO_RESOURCES = __constant_htons(3), | 151 | IB_CM_REJ_NO_RESOURCES = 3, |
152 | IB_CM_REJ_TIMEOUT = __constant_htons(4), | 152 | IB_CM_REJ_TIMEOUT = 4, |
153 | IB_CM_REJ_UNSUPPORTED = __constant_htons(5), | 153 | IB_CM_REJ_UNSUPPORTED = 5, |
154 | IB_CM_REJ_INVALID_COMM_ID = __constant_htons(6), | 154 | IB_CM_REJ_INVALID_COMM_ID = 6, |
155 | IB_CM_REJ_INVALID_COMM_INSTANCE = __constant_htons(7), | 155 | IB_CM_REJ_INVALID_COMM_INSTANCE = 7, |
156 | IB_CM_REJ_INVALID_SERVICE_ID = __constant_htons(8), | 156 | IB_CM_REJ_INVALID_SERVICE_ID = 8, |
157 | IB_CM_REJ_INVALID_TRANSPORT_TYPE = __constant_htons(9), | 157 | IB_CM_REJ_INVALID_TRANSPORT_TYPE = 9, |
158 | IB_CM_REJ_STALE_CONN = __constant_htons(10), | 158 | IB_CM_REJ_STALE_CONN = 10, |
159 | IB_CM_REJ_RDC_NOT_EXIST = __constant_htons(11), | 159 | IB_CM_REJ_RDC_NOT_EXIST = 11, |
160 | IB_CM_REJ_INVALID_GID = __constant_htons(12), | 160 | IB_CM_REJ_INVALID_GID = 12, |
161 | IB_CM_REJ_INVALID_LID = __constant_htons(13), | 161 | IB_CM_REJ_INVALID_LID = 13, |
162 | IB_CM_REJ_INVALID_SL = __constant_htons(14), | 162 | IB_CM_REJ_INVALID_SL = 14, |
163 | IB_CM_REJ_INVALID_TRAFFIC_CLASS = __constant_htons(15), | 163 | IB_CM_REJ_INVALID_TRAFFIC_CLASS = 15, |
164 | IB_CM_REJ_INVALID_HOP_LIMIT = __constant_htons(16), | 164 | IB_CM_REJ_INVALID_HOP_LIMIT = 16, |
165 | IB_CM_REJ_INVALID_PACKET_RATE = __constant_htons(17), | 165 | IB_CM_REJ_INVALID_PACKET_RATE = 17, |
166 | IB_CM_REJ_INVALID_ALT_GID = __constant_htons(18), | 166 | IB_CM_REJ_INVALID_ALT_GID = 18, |
167 | IB_CM_REJ_INVALID_ALT_LID = __constant_htons(19), | 167 | IB_CM_REJ_INVALID_ALT_LID = 19, |
168 | IB_CM_REJ_INVALID_ALT_SL = __constant_htons(20), | 168 | IB_CM_REJ_INVALID_ALT_SL = 20, |
169 | IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS = __constant_htons(21), | 169 | IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS = 21, |
170 | IB_CM_REJ_INVALID_ALT_HOP_LIMIT = __constant_htons(22), | 170 | IB_CM_REJ_INVALID_ALT_HOP_LIMIT = 22, |
171 | IB_CM_REJ_INVALID_ALT_PACKET_RATE = __constant_htons(23), | 171 | IB_CM_REJ_INVALID_ALT_PACKET_RATE = 23, |
172 | IB_CM_REJ_PORT_CM_REDIRECT = __constant_htons(24), | 172 | IB_CM_REJ_PORT_CM_REDIRECT = 24, |
173 | IB_CM_REJ_PORT_REDIRECT = __constant_htons(25), | 173 | IB_CM_REJ_PORT_REDIRECT = 25, |
174 | IB_CM_REJ_INVALID_MTU = __constant_htons(26), | 174 | IB_CM_REJ_INVALID_MTU = 26, |
175 | IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES = __constant_htons(27), | 175 | IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES = 27, |
176 | IB_CM_REJ_CONSUMER_DEFINED = __constant_htons(28), | 176 | IB_CM_REJ_CONSUMER_DEFINED = 28, |
177 | IB_CM_REJ_INVALID_RNR_RETRY = __constant_htons(29), | 177 | IB_CM_REJ_INVALID_RNR_RETRY = 29, |
178 | IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID = __constant_htons(30), | 178 | IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID = 30, |
179 | IB_CM_REJ_INVALID_CLASS_VERSION = __constant_htons(31), | 179 | IB_CM_REJ_INVALID_CLASS_VERSION = 31, |
180 | IB_CM_REJ_INVALID_FLOW_LABEL = __constant_htons(32), | 180 | IB_CM_REJ_INVALID_FLOW_LABEL = 32, |
181 | IB_CM_REJ_INVALID_ALT_FLOW_LABEL = __constant_htons(33) | 181 | IB_CM_REJ_INVALID_ALT_FLOW_LABEL = 33 |
182 | }; | 182 | }; |
183 | 183 | ||
184 | struct ib_cm_rej_event_param { | 184 | struct ib_cm_rej_event_param { |
@@ -222,8 +222,7 @@ struct ib_cm_sidr_req_event_param { | |||
222 | struct ib_cm_id *listen_id; | 222 | struct ib_cm_id *listen_id; |
223 | struct ib_device *device; | 223 | struct ib_device *device; |
224 | u8 port; | 224 | u8 port; |
225 | 225 | u16 pkey; | |
226 | u16 pkey; | ||
227 | }; | 226 | }; |
228 | 227 | ||
229 | enum ib_cm_sidr_status { | 228 | enum ib_cm_sidr_status { |
@@ -285,12 +284,12 @@ typedef int (*ib_cm_handler)(struct ib_cm_id *cm_id, | |||
285 | struct ib_cm_id { | 284 | struct ib_cm_id { |
286 | ib_cm_handler cm_handler; | 285 | ib_cm_handler cm_handler; |
287 | void *context; | 286 | void *context; |
288 | u64 service_id; | 287 | __be64 service_id; |
289 | u64 service_mask; | 288 | __be64 service_mask; |
290 | enum ib_cm_state state; /* internal CM/debug use */ | 289 | enum ib_cm_state state; /* internal CM/debug use */ |
291 | enum ib_cm_lap_state lap_state; /* internal CM/debug use */ | 290 | enum ib_cm_lap_state lap_state; /* internal CM/debug use */ |
292 | u32 local_id; | 291 | __be32 local_id; |
293 | u32 remote_id; | 292 | __be32 remote_id; |
294 | }; | 293 | }; |
295 | 294 | ||
296 | /** | 295 | /** |
@@ -330,13 +329,13 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id); | |||
330 | * IB_CM_ASSIGN_SERVICE_ID. | 329 | * IB_CM_ASSIGN_SERVICE_ID. |
331 | */ | 330 | */ |
332 | int ib_cm_listen(struct ib_cm_id *cm_id, | 331 | int ib_cm_listen(struct ib_cm_id *cm_id, |
333 | u64 service_id, | 332 | __be64 service_id, |
334 | u64 service_mask); | 333 | __be64 service_mask); |
335 | 334 | ||
336 | struct ib_cm_req_param { | 335 | struct ib_cm_req_param { |
337 | struct ib_sa_path_rec *primary_path; | 336 | struct ib_sa_path_rec *primary_path; |
338 | struct ib_sa_path_rec *alternate_path; | 337 | struct ib_sa_path_rec *alternate_path; |
339 | u64 service_id; | 338 | __be64 service_id; |
340 | u32 qp_num; | 339 | u32 qp_num; |
341 | enum ib_qp_type qp_type; | 340 | enum ib_qp_type qp_type; |
342 | u32 starting_psn; | 341 | u32 starting_psn; |
@@ -528,7 +527,7 @@ int ib_send_cm_apr(struct ib_cm_id *cm_id, | |||
528 | 527 | ||
529 | struct ib_cm_sidr_req_param { | 528 | struct ib_cm_sidr_req_param { |
530 | struct ib_sa_path_rec *path; | 529 | struct ib_sa_path_rec *path; |
531 | u64 service_id; | 530 | __be64 service_id; |
532 | int timeout_ms; | 531 | int timeout_ms; |
533 | const void *private_data; | 532 | const void *private_data; |
534 | u8 private_data_len; | 533 | u8 private_data_len; |
diff --git a/drivers/infiniband/include/ib_mad.h b/drivers/infiniband/include/ib_mad.h index 491b6f25b3b8..63237805d6af 100644 --- a/drivers/infiniband/include/ib_mad.h +++ b/drivers/infiniband/include/ib_mad.h | |||
@@ -111,12 +111,12 @@ struct ib_mad_hdr { | |||
111 | u8 mgmt_class; | 111 | u8 mgmt_class; |
112 | u8 class_version; | 112 | u8 class_version; |
113 | u8 method; | 113 | u8 method; |
114 | u16 status; | 114 | __be16 status; |
115 | u16 class_specific; | 115 | __be16 class_specific; |
116 | u64 tid; | 116 | __be64 tid; |
117 | u16 attr_id; | 117 | __be16 attr_id; |
118 | u16 resv; | 118 | __be16 resv; |
119 | u32 attr_mod; | 119 | __be32 attr_mod; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | struct ib_rmpp_hdr { | 122 | struct ib_rmpp_hdr { |
@@ -124,8 +124,8 @@ struct ib_rmpp_hdr { | |||
124 | u8 rmpp_type; | 124 | u8 rmpp_type; |
125 | u8 rmpp_rtime_flags; | 125 | u8 rmpp_rtime_flags; |
126 | u8 rmpp_status; | 126 | u8 rmpp_status; |
127 | u32 seg_num; | 127 | __be32 seg_num; |
128 | u32 paylen_newwin; | 128 | __be32 paylen_newwin; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | typedef u64 __bitwise ib_sa_comp_mask; | 131 | typedef u64 __bitwise ib_sa_comp_mask; |
@@ -139,9 +139,9 @@ typedef u64 __bitwise ib_sa_comp_mask; | |||
139 | * the wire so we can't change the layout) | 139 | * the wire so we can't change the layout) |
140 | */ | 140 | */ |
141 | struct ib_sa_hdr { | 141 | struct ib_sa_hdr { |
142 | u64 sm_key; | 142 | __be64 sm_key; |
143 | u16 attr_offset; | 143 | __be16 attr_offset; |
144 | u16 reserved; | 144 | __be16 reserved; |
145 | ib_sa_comp_mask comp_mask; | 145 | ib_sa_comp_mask comp_mask; |
146 | } __attribute__ ((packed)); | 146 | } __attribute__ ((packed)); |
147 | 147 | ||
diff --git a/drivers/infiniband/include/ib_sa.h b/drivers/infiniband/include/ib_sa.h index 6d999f7b5d93..326159c04aca 100644 --- a/drivers/infiniband/include/ib_sa.h +++ b/drivers/infiniband/include/ib_sa.h | |||
@@ -133,16 +133,16 @@ struct ib_sa_path_rec { | |||
133 | /* reserved */ | 133 | /* reserved */ |
134 | union ib_gid dgid; | 134 | union ib_gid dgid; |
135 | union ib_gid sgid; | 135 | union ib_gid sgid; |
136 | u16 dlid; | 136 | __be16 dlid; |
137 | u16 slid; | 137 | __be16 slid; |
138 | int raw_traffic; | 138 | int raw_traffic; |
139 | /* reserved */ | 139 | /* reserved */ |
140 | u32 flow_label; | 140 | __be32 flow_label; |
141 | u8 hop_limit; | 141 | u8 hop_limit; |
142 | u8 traffic_class; | 142 | u8 traffic_class; |
143 | int reversible; | 143 | int reversible; |
144 | u8 numb_path; | 144 | u8 numb_path; |
145 | u16 pkey; | 145 | __be16 pkey; |
146 | /* reserved */ | 146 | /* reserved */ |
147 | u8 sl; | 147 | u8 sl; |
148 | u8 mtu_selector; | 148 | u8 mtu_selector; |
@@ -176,18 +176,18 @@ struct ib_sa_path_rec { | |||
176 | struct ib_sa_mcmember_rec { | 176 | struct ib_sa_mcmember_rec { |
177 | union ib_gid mgid; | 177 | union ib_gid mgid; |
178 | union ib_gid port_gid; | 178 | union ib_gid port_gid; |
179 | u32 qkey; | 179 | __be32 qkey; |
180 | u16 mlid; | 180 | __be16 mlid; |
181 | u8 mtu_selector; | 181 | u8 mtu_selector; |
182 | u8 mtu; | 182 | u8 mtu; |
183 | u8 traffic_class; | 183 | u8 traffic_class; |
184 | u16 pkey; | 184 | __be16 pkey; |
185 | u8 rate_selector; | 185 | u8 rate_selector; |
186 | u8 rate; | 186 | u8 rate; |
187 | u8 packet_life_time_selector; | 187 | u8 packet_life_time_selector; |
188 | u8 packet_life_time; | 188 | u8 packet_life_time; |
189 | u8 sl; | 189 | u8 sl; |
190 | u32 flow_label; | 190 | __be32 flow_label; |
191 | u8 hop_limit; | 191 | u8 hop_limit; |
192 | u8 scope; | 192 | u8 scope; |
193 | u8 join_state; | 193 | u8 join_state; |
@@ -238,7 +238,7 @@ struct ib_sa_mcmember_rec { | |||
238 | struct ib_sa_service_rec { | 238 | struct ib_sa_service_rec { |
239 | u64 id; | 239 | u64 id; |
240 | union ib_gid gid; | 240 | union ib_gid gid; |
241 | u16 pkey; | 241 | __be16 pkey; |
242 | /* reserved */ | 242 | /* reserved */ |
243 | u32 lease; | 243 | u32 lease; |
244 | u8 key[16]; | 244 | u8 key[16]; |
diff --git a/drivers/infiniband/include/ib_smi.h b/drivers/infiniband/include/ib_smi.h index ca8216514963..c07b31cb9499 100644 --- a/drivers/infiniband/include/ib_smi.h +++ b/drivers/infiniband/include/ib_smi.h | |||
@@ -41,8 +41,6 @@ | |||
41 | 41 | ||
42 | #include <ib_mad.h> | 42 | #include <ib_mad.h> |
43 | 43 | ||
44 | #define IB_LID_PERMISSIVE 0xFFFF | ||
45 | |||
46 | #define IB_SMP_DATA_SIZE 64 | 44 | #define IB_SMP_DATA_SIZE 64 |
47 | #define IB_SMP_MAX_PATH_HOPS 64 | 45 | #define IB_SMP_MAX_PATH_HOPS 64 |
48 | 46 | ||
@@ -51,16 +49,16 @@ struct ib_smp { | |||
51 | u8 mgmt_class; | 49 | u8 mgmt_class; |
52 | u8 class_version; | 50 | u8 class_version; |
53 | u8 method; | 51 | u8 method; |
54 | u16 status; | 52 | __be16 status; |
55 | u8 hop_ptr; | 53 | u8 hop_ptr; |
56 | u8 hop_cnt; | 54 | u8 hop_cnt; |
57 | u64 tid; | 55 | __be64 tid; |
58 | u16 attr_id; | 56 | __be16 attr_id; |
59 | u16 resv; | 57 | __be16 resv; |
60 | u32 attr_mod; | 58 | __be32 attr_mod; |
61 | u64 mkey; | 59 | __be64 mkey; |
62 | u16 dr_slid; | 60 | __be16 dr_slid; |
63 | u16 dr_dlid; | 61 | __be16 dr_dlid; |
64 | u8 reserved[28]; | 62 | u8 reserved[28]; |
65 | u8 data[IB_SMP_DATA_SIZE]; | 63 | u8 data[IB_SMP_DATA_SIZE]; |
66 | u8 initial_path[IB_SMP_MAX_PATH_HOPS]; | 64 | u8 initial_path[IB_SMP_MAX_PATH_HOPS]; |
diff --git a/drivers/infiniband/include/ib_user_cm.h b/drivers/infiniband/include/ib_user_cm.h index 500b1af6ff77..72182d16778b 100644 --- a/drivers/infiniband/include/ib_user_cm.h +++ b/drivers/infiniband/include/ib_user_cm.h | |||
@@ -88,15 +88,15 @@ struct ib_ucm_attr_id { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | struct ib_ucm_attr_id_resp { | 90 | struct ib_ucm_attr_id_resp { |
91 | __u64 service_id; | 91 | __be64 service_id; |
92 | __u64 service_mask; | 92 | __be64 service_mask; |
93 | __u32 local_id; | 93 | __be32 local_id; |
94 | __u32 remote_id; | 94 | __be32 remote_id; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct ib_ucm_listen { | 97 | struct ib_ucm_listen { |
98 | __u64 service_id; | 98 | __be64 service_id; |
99 | __u64 service_mask; | 99 | __be64 service_mask; |
100 | __u32 id; | 100 | __u32 id; |
101 | }; | 101 | }; |
102 | 102 | ||
@@ -114,13 +114,13 @@ struct ib_ucm_private_data { | |||
114 | struct ib_ucm_path_rec { | 114 | struct ib_ucm_path_rec { |
115 | __u8 dgid[16]; | 115 | __u8 dgid[16]; |
116 | __u8 sgid[16]; | 116 | __u8 sgid[16]; |
117 | __u16 dlid; | 117 | __be16 dlid; |
118 | __u16 slid; | 118 | __be16 slid; |
119 | __u32 raw_traffic; | 119 | __u32 raw_traffic; |
120 | __u32 flow_label; | 120 | __be32 flow_label; |
121 | __u32 reversible; | 121 | __u32 reversible; |
122 | __u32 mtu; | 122 | __u32 mtu; |
123 | __u16 pkey; | 123 | __be16 pkey; |
124 | __u8 hop_limit; | 124 | __u8 hop_limit; |
125 | __u8 traffic_class; | 125 | __u8 traffic_class; |
126 | __u8 numb_path; | 126 | __u8 numb_path; |
@@ -138,7 +138,7 @@ struct ib_ucm_req { | |||
138 | __u32 qpn; | 138 | __u32 qpn; |
139 | __u32 qp_type; | 139 | __u32 qp_type; |
140 | __u32 psn; | 140 | __u32 psn; |
141 | __u64 sid; | 141 | __be64 sid; |
142 | __u64 data; | 142 | __u64 data; |
143 | __u64 primary_path; | 143 | __u64 primary_path; |
144 | __u64 alternate_path; | 144 | __u64 alternate_path; |
@@ -200,7 +200,7 @@ struct ib_ucm_lap { | |||
200 | struct ib_ucm_sidr_req { | 200 | struct ib_ucm_sidr_req { |
201 | __u32 id; | 201 | __u32 id; |
202 | __u32 timeout; | 202 | __u32 timeout; |
203 | __u64 sid; | 203 | __be64 sid; |
204 | __u64 data; | 204 | __u64 data; |
205 | __u64 path; | 205 | __u64 path; |
206 | __u16 pkey; | 206 | __u16 pkey; |
@@ -237,7 +237,7 @@ struct ib_ucm_req_event_resp { | |||
237 | /* port */ | 237 | /* port */ |
238 | struct ib_ucm_path_rec primary_path; | 238 | struct ib_ucm_path_rec primary_path; |
239 | struct ib_ucm_path_rec alternate_path; | 239 | struct ib_ucm_path_rec alternate_path; |
240 | __u64 remote_ca_guid; | 240 | __be64 remote_ca_guid; |
241 | __u32 remote_qkey; | 241 | __u32 remote_qkey; |
242 | __u32 remote_qpn; | 242 | __u32 remote_qpn; |
243 | __u32 qp_type; | 243 | __u32 qp_type; |
@@ -253,7 +253,7 @@ struct ib_ucm_req_event_resp { | |||
253 | }; | 253 | }; |
254 | 254 | ||
255 | struct ib_ucm_rep_event_resp { | 255 | struct ib_ucm_rep_event_resp { |
256 | __u64 remote_ca_guid; | 256 | __be64 remote_ca_guid; |
257 | __u32 remote_qkey; | 257 | __u32 remote_qkey; |
258 | __u32 remote_qpn; | 258 | __u32 remote_qpn; |
259 | __u32 starting_psn; | 259 | __u32 starting_psn; |
diff --git a/drivers/infiniband/include/ib_user_mad.h b/drivers/infiniband/include/ib_user_mad.h index a9a56b50aacc..44537aa32e62 100644 --- a/drivers/infiniband/include/ib_user_mad.h +++ b/drivers/infiniband/include/ib_user_mad.h | |||
@@ -70,8 +70,6 @@ | |||
70 | * @traffic_class - Traffic class in GRH | 70 | * @traffic_class - Traffic class in GRH |
71 | * @gid - Remote GID in GRH | 71 | * @gid - Remote GID in GRH |
72 | * @flow_label - Flow label in GRH | 72 | * @flow_label - Flow label in GRH |
73 | * | ||
74 | * All multi-byte quantities are stored in network (big endian) byte order. | ||
75 | */ | 73 | */ |
76 | struct ib_user_mad_hdr { | 74 | struct ib_user_mad_hdr { |
77 | __u32 id; | 75 | __u32 id; |
@@ -79,9 +77,9 @@ struct ib_user_mad_hdr { | |||
79 | __u32 timeout_ms; | 77 | __u32 timeout_ms; |
80 | __u32 retries; | 78 | __u32 retries; |
81 | __u32 length; | 79 | __u32 length; |
82 | __u32 qpn; | 80 | __be32 qpn; |
83 | __u32 qkey; | 81 | __be32 qkey; |
84 | __u16 lid; | 82 | __be16 lid; |
85 | __u8 sl; | 83 | __u8 sl; |
86 | __u8 path_bits; | 84 | __u8 path_bits; |
87 | __u8 grh_present; | 85 | __u8 grh_present; |
@@ -89,7 +87,7 @@ struct ib_user_mad_hdr { | |||
89 | __u8 hop_limit; | 87 | __u8 hop_limit; |
90 | __u8 traffic_class; | 88 | __u8 traffic_class; |
91 | __u8 gid[16]; | 89 | __u8 gid[16]; |
92 | __u32 flow_label; | 90 | __be32 flow_label; |
93 | }; | 91 | }; |
94 | 92 | ||
95 | /** | 93 | /** |
diff --git a/drivers/infiniband/include/ib_user_verbs.h b/drivers/infiniband/include/ib_user_verbs.h index 7c613706af72..35857857aa3e 100644 --- a/drivers/infiniband/include/ib_user_verbs.h +++ b/drivers/infiniband/include/ib_user_verbs.h | |||
@@ -143,8 +143,8 @@ struct ib_uverbs_query_device { | |||
143 | 143 | ||
144 | struct ib_uverbs_query_device_resp { | 144 | struct ib_uverbs_query_device_resp { |
145 | __u64 fw_ver; | 145 | __u64 fw_ver; |
146 | __u64 node_guid; | 146 | __be64 node_guid; |
147 | __u64 sys_image_guid; | 147 | __be64 sys_image_guid; |
148 | __u64 max_mr_size; | 148 | __u64 max_mr_size; |
149 | __u64 page_size_cap; | 149 | __u64 page_size_cap; |
150 | __u32 vendor_id; | 150 | __u32 vendor_id; |
diff --git a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h index 8d5ea9568337..042a7d11fbcc 100644 --- a/drivers/infiniband/include/ib_verbs.h +++ b/drivers/infiniband/include/ib_verbs.h | |||
@@ -51,8 +51,8 @@ | |||
51 | union ib_gid { | 51 | union ib_gid { |
52 | u8 raw[16]; | 52 | u8 raw[16]; |
53 | struct { | 53 | struct { |
54 | u64 subnet_prefix; | 54 | __be64 subnet_prefix; |
55 | u64 interface_id; | 55 | __be64 interface_id; |
56 | } global; | 56 | } global; |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -88,8 +88,8 @@ enum ib_atomic_cap { | |||
88 | 88 | ||
89 | struct ib_device_attr { | 89 | struct ib_device_attr { |
90 | u64 fw_ver; | 90 | u64 fw_ver; |
91 | u64 node_guid; | 91 | __be64 node_guid; |
92 | u64 sys_image_guid; | 92 | __be64 sys_image_guid; |
93 | u64 max_mr_size; | 93 | u64 max_mr_size; |
94 | u64 page_size_cap; | 94 | u64 page_size_cap; |
95 | u32 vendor_id; | 95 | u32 vendor_id; |
@@ -291,8 +291,8 @@ struct ib_global_route { | |||
291 | }; | 291 | }; |
292 | 292 | ||
293 | struct ib_grh { | 293 | struct ib_grh { |
294 | u32 version_tclass_flow; | 294 | __be32 version_tclass_flow; |
295 | u16 paylen; | 295 | __be16 paylen; |
296 | u8 next_hdr; | 296 | u8 next_hdr; |
297 | u8 hop_limit; | 297 | u8 hop_limit; |
298 | union ib_gid sgid; | 298 | union ib_gid sgid; |
@@ -303,6 +303,8 @@ enum { | |||
303 | IB_MULTICAST_QPN = 0xffffff | 303 | IB_MULTICAST_QPN = 0xffffff |
304 | }; | 304 | }; |
305 | 305 | ||
306 | #define IB_LID_PERMISSIVE __constant_htons(0xFFFF) | ||
307 | |||
306 | enum ib_ah_flags { | 308 | enum ib_ah_flags { |
307 | IB_AH_GRH = 1 | 309 | IB_AH_GRH = 1 |
308 | }; | 310 | }; |