diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 00:14:26 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 00:14:26 -0400 |
commit | d5b732b17ca2fc74f370bdba5aae6c804fac8c35 (patch) | |
tree | 4facc6d96116b032a3c1cb2ced9b2a3008e9216e /drivers/infiniband/hw/cxgb4/cq.c | |
parent | eb6e8605ee5f5b4e116451bf01b3f35eac446dde (diff) | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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); |