/* incr is ignored in native Arbel (mem-free) mode, so cq->cons_index should be correct before calling update_cons_index().  */
static void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, int incr)
/* incr is ignored in native Arbel (mem-free) mode, so cq->cons_index should be correct before calling update_cons_index().  */
static void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, int incr)
{
	if (mthca_is_memfree(dev)) {
		*cq->set_ci_db = cpu_to_be32(cq->cons_index);
		wmb();
	} else {
		mthca_write64(MTHCA_TAVOR_CQ_DB_INC_CI | cq->cqn, incr - 1,
			      dev->kar + MTHCA_CQ_DOORBELL,
			      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
		mmiowb();
	}
}