projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
IB/mthca: Set cleaned CQEs back to HW ownership when cleaning CQ
[cascardo/linux.git]
/
drivers
/
infiniband
/
hw
/
mthca
/
mthca_cq.c
diff --git
a/drivers/infiniband/hw/mthca/mthca_cq.c
b/drivers/infiniband/hw/mthca/mthca_cq.c
index
cf0868f
..
ca224d0
100644
(file)
--- a/
drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/
drivers/infiniband/hw/mthca/mthca_cq.c
@@
-284,7
+284,7
@@
void mthca_cq_clean(struct mthca_dev *dev, struct mthca_cq *cq, u32 qpn,
{
struct mthca_cqe *cqe;
u32 prod_index;
{
struct mthca_cqe *cqe;
u32 prod_index;
- int nfreed = 0;
+ int
i,
nfreed = 0;
spin_lock_irq(&cq->lock);
spin_lock_irq(&cq->lock);
@@
-321,6
+321,8
@@
void mthca_cq_clean(struct mthca_dev *dev, struct mthca_cq *cq, u32 qpn,
}
if (nfreed) {
}
if (nfreed) {
+ for (i = 0; i < nfreed; ++i)
+ set_cqe_hw(get_cqe(cq, (cq->cons_index + i) & cq->ibcq.cqe));
wmb();
cq->cons_index += nfreed;
update_cons_index(dev, cq, nfreed);
wmb();
cq->cons_index += nfreed;
update_cons_index(dev, cq, nfreed);