diff options
author | Selvin Xavier <selvin.xavier@emulex.com> | 2014-06-10 10:02:19 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 18:07:36 -0400 |
commit | a96ffb1de9d656ce7083277a8badaa1082813498 (patch) | |
tree | 31cc1d01231d2c89e63675fc7f921fa963511cee /drivers/infiniband | |
parent | daac96815e969bd70ed5ad21231be2fc5d99506d (diff) |
RDMA/ocrdma: Avoid reporting wrong completions in case of error CQEs
During cable pull test with a mount over NFS/RDMA, the driver was
reporting error completions when there were no pending requests in the
SQ and RQ. This was triggering a host crash because of reporting
wrong work req id. Avoid this crash by adding a check for SQ and RQ
empty condition and prevent reporting completions if queues are empty.
Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 0d7d8083287f..2b68235973d7 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -2489,6 +2489,11 @@ static bool ocrdma_poll_err_scqe(struct ocrdma_qp *qp, | |||
2489 | *stop = true; | 2489 | *stop = true; |
2490 | expand = false; | 2490 | expand = false; |
2491 | } | 2491 | } |
2492 | } else if (is_hw_sq_empty(qp)) { | ||
2493 | /* Do nothing */ | ||
2494 | expand = false; | ||
2495 | *polled = false; | ||
2496 | *stop = false; | ||
2492 | } else { | 2497 | } else { |
2493 | *polled = true; | 2498 | *polled = true; |
2494 | expand = ocrdma_update_err_scqe(ibwc, cqe, qp, status); | 2499 | expand = ocrdma_update_err_scqe(ibwc, cqe, qp, status); |
@@ -2594,6 +2599,11 @@ static bool ocrdma_poll_err_rcqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, | |||
2594 | *stop = true; | 2599 | *stop = true; |
2595 | expand = false; | 2600 | expand = false; |
2596 | } | 2601 | } |
2602 | } else if (is_hw_rq_empty(qp)) { | ||
2603 | /* Do nothing */ | ||
2604 | expand = false; | ||
2605 | *polled = false; | ||
2606 | *stop = false; | ||
2597 | } else { | 2607 | } else { |
2598 | *polled = true; | 2608 | *polled = true; |
2599 | expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status); | 2609 | expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status); |