diff options
author | Roland Dreier <roland@eddore.topspincom.com> | 2005-07-27 17:38:49 -0400 |
---|---|---|
committer | Roland Dreier <roland@eddore.topspincom.com> | 2005-07-27 17:38:49 -0400 |
commit | 42b1806d5cfc93bf8c3d7fa6e9e79e4ec860c678 (patch) | |
tree | e12240b90a87a22edf0846e1939254d6ae085737 /drivers/infiniband | |
parent | 9e566d8bd61f939b7f5d7d969f5b178571471cf9 (diff) |
[IB/mthca]: Fix error CQ entry handling on mem-free HCAs
Fix handling of error CQ entries on mem-free HCAs: the doorbell count
is never valid so we shouldn't look at it. This fixes problems exposed
by new HCA firmware.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index b5aea7b869f6..5687c3014522 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c | |||
@@ -373,8 +373,12 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, | |||
373 | * If we're at the end of the WQE chain, or we've used up our | 373 | * If we're at the end of the WQE chain, or we've used up our |
374 | * doorbell count, free the CQE. Otherwise just update it for | 374 | * doorbell count, free the CQE. Otherwise just update it for |
375 | * the next poll operation. | 375 | * the next poll operation. |
376 | * | ||
377 | * This does not apply to mem-free HCAs: they don't use the | ||
378 | * doorbell count field, and so we should always free the CQE. | ||
376 | */ | 379 | */ |
377 | if (!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd)) | 380 | if (mthca_is_memfree(dev) || |
381 | !(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd)) | ||
378 | return 0; | 382 | return 0; |
379 | 383 | ||
380 | cqe->db_cnt = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd); | 384 | cqe->db_cnt = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd); |