Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6159
b: refs/heads/master
c: 288bdeb
h: refs/heads/master
i:
  6157: 407b366
  6155: 9090db2
  6151: 60583ca
  6143: 9167c97
v: v3
  • Loading branch information
Roland Dreier authored and Roland Dreier committed Aug 27, 2005
1 parent f0e5106 commit 9cf5059
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87b816706bb2b79fbaff8e0b8e279e783273383e
refs/heads/master: 288bdeb4bc5b89befd7ee2f0f0183604034ff6c5
13 changes: 8 additions & 5 deletions trunk/drivers/infiniband/hw/mthca/mthca_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,13 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
break;
}

/*
* Mem-free HCAs always generate one CQE per WQE, even in the
* error case, so we don't have to check the doorbell count, etc.
*/
if (mthca_is_memfree(dev))
return 0;

err = mthca_free_err_wqe(dev, qp, is_send, wqe_index, &dbd, &new_wqe);
if (err)
return err;
Expand All @@ -375,12 +382,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
* If we're at the end of the WQE chain, or we've used up our
* doorbell count, free the CQE. Otherwise just update it for
* the next poll operation.
*
* This does not apply to mem-free HCAs: they don't use the
* doorbell count field, and so we should always free the CQE.
*/
if (mthca_is_memfree(dev) ||
!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd))
if (!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd))
return 0;

cqe->db_cnt = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd);
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,10 +2086,7 @@ int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send,
else
next = get_recv_wqe(qp, index);

if (mthca_is_memfree(dev))
*dbd = 1;
else
*dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD));
*dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD));
if (next->ee_nds & cpu_to_be32(0x3f))
*new_wqe = (next->nda_op & cpu_to_be32(~0x3f)) |
(next->ee_nds & cpu_to_be32(0x3f));
Expand Down

0 comments on commit 9cf5059

Please sign in to comment.