aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2014-03-21 11:10:32 -0400
committerRoland Dreier <roland@purestorage.com>2014-03-24 13:07:35 -0400
commit70b9c66053ecadde421658b8ec808c981f2eef11 (patch)
treeae8aabd332a476c07b38d417d9872c9de79070d5 /drivers/infiniband/hw/cxgb4
parent1ce1d471acb7ad8e8b8e3a2972de9fbb5f2be79a (diff)
RDMA/cxgb4: Ignore read reponse type 1 CQEs
These are generated by HW in some error cases and need to be silently discarded. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r--drivers/infiniband/hw/cxgb4/cq.c24
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 */