diff options
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index d6a7db2c42f6..ce468e542428 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -365,8 +365,14 @@ void c4iw_flush_hw_cq(struct c4iw_cq *chp) | |||
365 | 365 | ||
366 | if (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP) { | 366 | if (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP) { |
367 | 367 | ||
368 | /* | 368 | /* If we have reached here because of async |
369 | * drop peer2peer RTR reads. | 369 | * event or other error, and have egress error |
370 | * then drop | ||
371 | */ | ||
372 | if (CQE_TYPE(hw_cqe) == 1) | ||
373 | goto next_cqe; | ||
374 | |||
375 | /* drop peer2peer RTR reads. | ||
370 | */ | 376 | */ |
371 | if (CQE_WRID_STAG(hw_cqe) == 1) | 377 | if (CQE_WRID_STAG(hw_cqe) == 1) |
372 | goto next_cqe; | 378 | goto next_cqe; |
@@ -511,8 +517,18 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, | |||
511 | */ | 517 | */ |
512 | if (RQ_TYPE(hw_cqe) && (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP)) { | 518 | if (RQ_TYPE(hw_cqe) && (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP)) { |
513 | 519 | ||
514 | /* | 520 | /* If we have reached here because of async |
515 | * If this is an unsolicited read response, then the read | 521 | * event or other error, and have egress error |
522 | * then drop | ||
523 | */ | ||
524 | if (CQE_TYPE(hw_cqe) == 1) { | ||
525 | if (CQE_STATUS(hw_cqe)) | ||
526 | t4_set_wq_in_error(wq); | ||
527 | ret = -EAGAIN; | ||
528 | goto skip_cqe; | ||
529 | } | ||
530 | |||
531 | /* If this is an unsolicited read response, then the read | ||
516 | * was generated by the kernel driver as part of peer-2-peer | 532 | * was generated by the kernel driver as part of peer-2-peer |
517 | * connection setup. So ignore the completion. | 533 | * connection setup. So ignore the completion. |
518 | */ | 534 | */ |