aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_verbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 4dafbe16e82a..a651e9d9f0ef 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -929,7 +929,7 @@ static struct ib_pd *nes_alloc_pd(struct ib_device *ibdev,
929 NES_MAX_USER_DB_REGIONS, nesucontext->first_free_db); 929 NES_MAX_USER_DB_REGIONS, nesucontext->first_free_db);
930 nes_debug(NES_DBG_PD, "find_first_zero_biton doorbells returned %u, mapping pd_id %u.\n", 930 nes_debug(NES_DBG_PD, "find_first_zero_biton doorbells returned %u, mapping pd_id %u.\n",
931 nespd->mmap_db_index, nespd->pd_id); 931 nespd->mmap_db_index, nespd->pd_id);
932 if (nespd->mmap_db_index > NES_MAX_USER_DB_REGIONS) { 932 if (nespd->mmap_db_index >= NES_MAX_USER_DB_REGIONS) {
933 nes_debug(NES_DBG_PD, "mmap_db_index > MAX\n"); 933 nes_debug(NES_DBG_PD, "mmap_db_index > MAX\n");
934 nes_free_resource(nesadapter, nesadapter->allocated_pds, pd_num); 934 nes_free_resource(nesadapter, nesadapter->allocated_pds, pd_num);
935 kfree(nespd); 935 kfree(nespd);
@@ -1327,7 +1327,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1327 (long long unsigned int)req.user_wqe_buffers); 1327 (long long unsigned int)req.user_wqe_buffers);
1328 nes_free_resource(nesadapter, nesadapter->allocated_qps, qp_num); 1328 nes_free_resource(nesadapter, nesadapter->allocated_qps, qp_num);
1329 kfree(nesqp->allocated_buffer); 1329 kfree(nesqp->allocated_buffer);
1330 return ERR_PTR(-ENOMEM); 1330 return ERR_PTR(-EFAULT);
1331 } 1331 }
1332 } 1332 }
1333 1333
@@ -1674,6 +1674,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1674 } 1674 }
1675 nes_debug(NES_DBG_CQ, "CQ Virtual Address = %08lX, size = %u.\n", 1675 nes_debug(NES_DBG_CQ, "CQ Virtual Address = %08lX, size = %u.\n",
1676 (unsigned long)req.user_cq_buffer, entries); 1676 (unsigned long)req.user_cq_buffer, entries);
1677 err = 1;
1677 list_for_each_entry(nespbl, &nes_ucontext->cq_reg_mem_list, list) { 1678 list_for_each_entry(nespbl, &nes_ucontext->cq_reg_mem_list, list) {
1678 if (nespbl->user_base == (unsigned long )req.user_cq_buffer) { 1679 if (nespbl->user_base == (unsigned long )req.user_cq_buffer) {
1679 list_del(&nespbl->list); 1680 list_del(&nespbl->list);
@@ -1686,7 +1687,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1686 if (err) { 1687 if (err) {
1687 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num); 1688 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
1688 kfree(nescq); 1689 kfree(nescq);
1689 return ERR_PTR(err); 1690 return ERR_PTR(-EFAULT);
1690 } 1691 }
1691 1692
1692 pbl_entries = nespbl->pbl_size >> 3; 1693 pbl_entries = nespbl->pbl_size >> 3;
@@ -1831,9 +1832,6 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1831 spin_unlock_irqrestore(&nesdev->cqp.lock, flags); 1832 spin_unlock_irqrestore(&nesdev->cqp.lock, flags);
1832 } 1833 }
1833 } 1834 }
1834 nes_debug(NES_DBG_CQ, "iWARP CQ%u create timeout expired, major code = 0x%04X,"
1835 " minor code = 0x%04X\n",
1836 nescq->hw_cq.cq_number, cqp_request->major_code, cqp_request->minor_code);
1837 if (!context) 1835 if (!context)
1838 pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem, 1836 pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
1839 nescq->hw_cq.cq_pbase); 1837 nescq->hw_cq.cq_pbase);