diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cq.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index fb1aafcc294f..2447f5295482 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -373,6 +373,7 @@ static void create_read_req_cqe(struct t4_wq *wq, struct t4_cqe *hw_cqe, | |||
373 | V_CQE_SWCQE(SW_CQE(hw_cqe)) | | 373 | V_CQE_SWCQE(SW_CQE(hw_cqe)) | |
374 | V_CQE_OPCODE(FW_RI_READ_REQ) | | 374 | V_CQE_OPCODE(FW_RI_READ_REQ) | |
375 | V_CQE_TYPE(1)); | 375 | V_CQE_TYPE(1)); |
376 | read_cqe->bits_type_ts = hw_cqe->bits_type_ts; | ||
376 | } | 377 | } |
377 | 378 | ||
378 | /* | 379 | /* |
@@ -780,6 +781,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
780 | /* account for the status page. */ | 781 | /* account for the status page. */ |
781 | entries++; | 782 | entries++; |
782 | 783 | ||
784 | /* IQ needs one extra entry to differentiate full vs empty. */ | ||
785 | entries++; | ||
786 | |||
783 | /* | 787 | /* |
784 | * entries must be multiple of 16 for HW. | 788 | * entries must be multiple of 16 for HW. |
785 | */ | 789 | */ |
@@ -801,7 +805,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
801 | 805 | ||
802 | chp->rhp = rhp; | 806 | chp->rhp = rhp; |
803 | chp->cq.size--; /* status page */ | 807 | chp->cq.size--; /* status page */ |
804 | chp->ibcq.cqe = chp->cq.size; | 808 | chp->ibcq.cqe = chp->cq.size - 1; |
805 | spin_lock_init(&chp->lock); | 809 | spin_lock_init(&chp->lock); |
806 | atomic_set(&chp->refcnt, 1); | 810 | atomic_set(&chp->refcnt, 1); |
807 | init_waitqueue_head(&chp->wait); | 811 | init_waitqueue_head(&chp->wait); |