Message ID | 1459832028-27852-1-git-send-email-hariprasad@chelsio.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Apr 05, 2016 at 10:23:48AM +0530, Hariprasad Shenai wrote: > > Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size") > > Signed-off-by: Steve Wise <swise@opengridcomputing.com> > Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> > --- > V2: Add RDMA to subject line, add kernel panic trace and the commit where > issue was introduced, based on review comment by Leon Romanovsky <leon@leon.nu> Thanks a lot, Reviewed-by: Leon Romanovsky <leon@leon.nu> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/05/2016 01:34 AM, Leon Romanovsky wrote: > On Tue, Apr 05, 2016 at 10:23:48AM +0530, Hariprasad Shenai wrote: >> >> Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size") >> >> Signed-off-by: Steve Wise <swise@opengridcomputing.com> >> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> >> --- >> V2: Add RDMA to subject line, add kernel panic trace and the commit where >> issue was introduced, based on review comment by Leon Romanovsky <leon@leon.nu> > > Thanks a lot, > Reviewed-by: Leon Romanovsky <leon@leon.nu> > I picked this up for 4.6-rc, but I reworded the commit message a bit (the subject line was too long).
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index b4eeb783573c..b0b955724458 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -162,7 +162,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq, cq->bar2_va = c4iw_bar2_addrs(rdev, cq->cqid, T4_BAR2_QTYPE_INGRESS, &cq->bar2_qid, user ? &cq->bar2_pa : NULL); - if (user && !cq->bar2_va) { + if (user && !cq->bar2_pa) { pr_warn(MOD "%s: cqid %u not in BAR2 range.\n", pci_name(rdev->lldi.pdev), cq->cqid); ret = -EINVAL; diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index e17fb5d5e033..48ca455d057b 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -185,6 +185,10 @@ void __iomem *c4iw_bar2_addrs(struct c4iw_rdev *rdev, unsigned int qid, if (pbar2_pa) *pbar2_pa = (rdev->bar2_pa + bar2_qoffset) & PAGE_MASK; + + if (is_t4(rdev->lldi.adapter_type)) + return NULL; + return rdev->bar2_kva + bar2_qoffset; } @@ -270,7 +274,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, /* * User mode must have bar2 access. */ - if (user && (!wq->sq.bar2_va || !wq->rq.bar2_va)) { + if (user && (!wq->sq.bar2_pa || !wq->rq.bar2_pa)) { pr_warn(MOD "%s: sqid %u or rqid %u not in BAR2 range.\n", pci_name(rdev->lldi.pdev), wq->sq.qid, wq->rq.qid); goto free_dma;