|
@@ -106,7 +106,7 @@ static int ib_mi_handle ( struct ib_device *ibdev,
|
106
|
106
|
|
107
|
107
|
/* Otherwise, ignore it */
|
108
|
108
|
DBGC ( mi, "MI %p RX TID %08x%08x ignored\n",
|
109
|
|
- mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ) );
|
|
109
|
+ mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ) );
|
110
|
110
|
return -ENOTSUP;
|
111
|
111
|
}
|
112
|
112
|
|
|
@@ -152,7 +152,7 @@ static void ib_mi_complete_recv ( struct ib_device *ibdev,
|
152
|
152
|
goto out;
|
153
|
153
|
}
|
154
|
154
|
DBGC ( mi, "MI %p RX TID %08x%08x (%02x,%02x,%02x,%04x) status "
|
155
|
|
- "%04x\n", mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ),
|
|
155
|
+ "%04x\n", mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ),
|
156
|
156
|
hdr->mgmt_class, hdr->class_version, hdr->method,
|
157
|
157
|
ntohs ( hdr->attr_id ), ntohs ( hdr->status ) );
|
158
|
158
|
DBGC2_HDA ( mi, 0, mad, sizeof ( *mad ) );
|
|
@@ -192,12 +192,12 @@ int ib_mi_send ( struct ib_device *ibdev, struct ib_mad_interface *mi,
|
192
|
192
|
|
193
|
193
|
/* Set common fields */
|
194
|
194
|
hdr->base_version = IB_MGMT_BASE_VERSION;
|
195
|
|
- if ( ( hdr->tid[0] == 0 ) && ( hdr->tid[1] == 0 ) ) {
|
196
|
|
- hdr->tid[0] = htonl ( IB_MI_TID_MAGIC );
|
197
|
|
- hdr->tid[1] = htonl ( ++next_tid );
|
|
195
|
+ if ( ( hdr->tid.high == 0 ) && ( hdr->tid.low == 0 ) ) {
|
|
196
|
+ hdr->tid.high = htonl ( IB_MI_TID_MAGIC );
|
|
197
|
+ hdr->tid.low = htonl ( ++next_tid );
|
198
|
198
|
}
|
199
|
199
|
DBGC ( mi, "MI %p TX TID %08x%08x (%02x,%02x,%02x,%04x) status "
|
200
|
|
- "%04x\n", mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ),
|
|
200
|
+ "%04x\n", mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ),
|
201
|
201
|
hdr->mgmt_class, hdr->class_version, hdr->method,
|
202
|
202
|
ntohs ( hdr->attr_id ), ntohs ( hdr->status ) );
|
203
|
203
|
DBGC2_HDA ( mi, 0, mad, sizeof ( *mad ) );
|
|
@@ -217,8 +217,8 @@ int ib_mi_send ( struct ib_device *ibdev, struct ib_mad_interface *mi,
|
217
|
217
|
smp->return_path.hops[hop_pointer] = ibdev->port;
|
218
|
218
|
} else {
|
219
|
219
|
DBGC ( mi, "MI %p TX TID %08x%08x invalid hop pointer "
|
220
|
|
- "%d\n", mi, ntohl ( hdr->tid[0] ),
|
221
|
|
- ntohl ( hdr->tid[1] ), hop_pointer );
|
|
220
|
+ "%d\n", mi, ntohl ( hdr->tid.high ),
|
|
221
|
+ ntohl ( hdr->tid.low ), hop_pointer );
|
222
|
222
|
return -EINVAL;
|
223
|
223
|
}
|
224
|
224
|
}
|
|
@@ -228,7 +228,7 @@ int ib_mi_send ( struct ib_device *ibdev, struct ib_mad_interface *mi,
|
228
|
228
|
if ( ! iobuf ) {
|
229
|
229
|
DBGC ( mi, "MI %p could not allocate buffer for TID "
|
230
|
230
|
"%08x%08x\n",
|
231
|
|
- mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ) );
|
|
231
|
+ mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ) );
|
232
|
232
|
return -ENOMEM;
|
233
|
233
|
}
|
234
|
234
|
memcpy ( iob_put ( iobuf, sizeof ( *mad ) ), mad, sizeof ( *mad ) );
|
|
@@ -236,7 +236,7 @@ int ib_mi_send ( struct ib_device *ibdev, struct ib_mad_interface *mi,
|
236
|
236
|
/* Send I/O buffer */
|
237
|
237
|
if ( ( rc = ib_post_send ( ibdev, mi->qp, av, iobuf ) ) != 0 ) {
|
238
|
238
|
DBGC ( mi, "MI %p TX TID %08x%08x failed: %s\n",
|
239
|
|
- mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ),
|
|
239
|
+ mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ),
|
240
|
240
|
strerror ( rc ) );
|
241
|
241
|
free_iob ( iobuf );
|
242
|
242
|
return rc;
|
|
@@ -261,7 +261,7 @@ static void ib_mi_timer_expired ( struct retry_timer *timer, int expired ) {
|
261
|
261
|
/* Abandon transaction if we have tried too many times */
|
262
|
262
|
if ( expired ) {
|
263
|
263
|
DBGC ( mi, "MI %p abandoning TID %08x%08x\n",
|
264
|
|
- mi, ntohl ( hdr->tid[0] ), ntohl ( hdr->tid[1] ) );
|
|
264
|
+ mi, ntohl ( hdr->tid.high ), ntohl ( hdr->tid.low ) );
|
265
|
265
|
madx->op->complete ( ibdev, mi, madx, -ETIMEDOUT, NULL, NULL );
|
266
|
266
|
return;
|
267
|
267
|
}
|
|
@@ -408,8 +408,8 @@ void ib_destroy_mi ( struct ib_device *ibdev, struct ib_mad_interface *mi ) {
|
408
|
408
|
/* Flush any outstanding requests */
|
409
|
409
|
list_for_each_entry_safe ( madx, tmp, &mi->madx, list ) {
|
410
|
410
|
DBGC ( mi, "MI %p destroyed while TID %08x%08x in progress\n",
|
411
|
|
- mi, ntohl ( madx->mad.hdr.tid[0] ),
|
412
|
|
- ntohl ( madx->mad.hdr.tid[1] ) );
|
|
411
|
+ mi, ntohl ( madx->mad.hdr.tid.high ),
|
|
412
|
+ ntohl ( madx->mad.hdr.tid.low ) );
|
413
|
413
|
madx->op->complete ( ibdev, mi, madx, -ECANCELED, NULL, NULL );
|
414
|
414
|
}
|
415
|
415
|
|