diff options
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_uc.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_uc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qib/qib_uc.c b/drivers/infiniband/hw/qib/qib_uc.c index 32ccf3c824ca..d31f33a99887 100644 --- a/drivers/infiniband/hw/qib/qib_uc.c +++ b/drivers/infiniband/hw/qib/qib_uc.c | |||
@@ -270,7 +270,6 @@ void qib_uc_rcv(struct qib_ibport *ibp, struct qib_ib_header *hdr, | |||
270 | 270 | ||
271 | psn = be32_to_cpu(ohdr->bth[2]); | 271 | psn = be32_to_cpu(ohdr->bth[2]); |
272 | opcode >>= 24; | 272 | opcode >>= 24; |
273 | memset(&wc, 0, sizeof wc); | ||
274 | 273 | ||
275 | /* Compare the PSN verses the expected PSN. */ | 274 | /* Compare the PSN verses the expected PSN. */ |
276 | if (unlikely(qib_cmp24(psn, qp->r_psn) != 0)) { | 275 | if (unlikely(qib_cmp24(psn, qp->r_psn) != 0)) { |
@@ -370,7 +369,7 @@ send_first: | |||
370 | } | 369 | } |
371 | qp->r_rcv_len = 0; | 370 | qp->r_rcv_len = 0; |
372 | if (opcode == OP(SEND_ONLY)) | 371 | if (opcode == OP(SEND_ONLY)) |
373 | goto send_last; | 372 | goto no_immediate_data; |
374 | else if (opcode == OP(SEND_ONLY_WITH_IMMEDIATE)) | 373 | else if (opcode == OP(SEND_ONLY_WITH_IMMEDIATE)) |
375 | goto send_last_imm; | 374 | goto send_last_imm; |
376 | /* FALLTHROUGH */ | 375 | /* FALLTHROUGH */ |
@@ -389,8 +388,11 @@ send_last_imm: | |||
389 | wc.ex.imm_data = ohdr->u.imm_data; | 388 | wc.ex.imm_data = ohdr->u.imm_data; |
390 | hdrsize += 4; | 389 | hdrsize += 4; |
391 | wc.wc_flags = IB_WC_WITH_IMM; | 390 | wc.wc_flags = IB_WC_WITH_IMM; |
392 | /* FALLTHROUGH */ | 391 | goto send_last; |
393 | case OP(SEND_LAST): | 392 | case OP(SEND_LAST): |
393 | no_immediate_data: | ||
394 | wc.ex.imm_data = 0; | ||
395 | wc.wc_flags = 0; | ||
394 | send_last: | 396 | send_last: |
395 | /* Get the number of bytes the message was padded by. */ | 397 | /* Get the number of bytes the message was padded by. */ |
396 | pad = (be32_to_cpu(ohdr->bth[0]) >> 20) & 3; | 398 | pad = (be32_to_cpu(ohdr->bth[0]) >> 20) & 3; |
@@ -418,6 +420,12 @@ last_imm: | |||
418 | wc.src_qp = qp->remote_qpn; | 420 | wc.src_qp = qp->remote_qpn; |
419 | wc.slid = qp->remote_ah_attr.dlid; | 421 | wc.slid = qp->remote_ah_attr.dlid; |
420 | wc.sl = qp->remote_ah_attr.sl; | 422 | wc.sl = qp->remote_ah_attr.sl; |
423 | /* zero fields that are N/A */ | ||
424 | wc.vendor_err = 0; | ||
425 | wc.pkey_index = 0; | ||
426 | wc.dlid_path_bits = 0; | ||
427 | wc.port_num = 0; | ||
428 | wc.csum_ok = 0; | ||
421 | /* Signal completion event if the solicited bit is set. */ | 429 | /* Signal completion event if the solicited bit is set. */ |
422 | qib_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, | 430 | qib_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, |
423 | (ohdr->bth[0] & | 431 | (ohdr->bth[0] & |