summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
diff options
context:
space:
mode:
authorMitesh Ahuja <mitesh.ahuja@avagotech.com>2015-05-19 11:32:37 +0530
committerDoug Ledford <dledford@redhat.com>2015-05-18 10:25:24 -0400
commit59582d86e23f30466413a04cc4db678b09f937ea (patch)
treec0b625a86ddb2298c55349b1521e7f2f9d0c7c3d /drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
parent038ab8b7432c0280f064a47173dc5b6412243674 (diff)
RDMA/ocrdma: Prevent allocation of DPP PDs if FW doesnt support it
If DPP PDs are not supported by the FW, allocate only normal PDs. Signed-off-by: Mitesh Ahuja <mitesh.ahuja@avagotech.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_verbs.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 06e8ab7825b9..9dcb66077d6c 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -365,7 +365,7 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev,
if (!pd)
return ERR_PTR(-ENOMEM);
- if (udata && uctx) {
+ if (udata && uctx && dev->attr.max_dpp_pds) {
pd->dpp_enabled =
ocrdma_get_asic_type(dev) == OCRDMA_ASIC_GEN_SKH_R;
pd->num_dpp_qp =