diff options
author | Mitesh Ahuja <mitesh.ahuja@avagotech.com> | 2015-05-19 09:02:37 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-18 17:25:24 +0300 |
commit | 59582d86e23f30466413a04cc4db678b09f937ea (patch) | |
tree | c0b625a86ddb2298c55349b1521e7f2f9d0c7c3d /drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |
parent | 038ab8b7432c0280f064a47173dc5b6412243674 (diff) | |
download | linux-59582d86e23f30466413a04cc4db678b09f937ea.tar.xz |
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.c | 2 |
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 = |