aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-22 13:07:23 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:28 -0500
commit5df1673f1de2b6dad614c929ef47ccebba3bd970 (patch)
tree653bbe08880cf434c2e578c8c89e34f9ee055ec5 /drivers/infiniband/hw/qib
parentIB/rdmavt: Add support for rvt_query_qp (diff)
downloadlinux-dev-5df1673f1de2b6dad614c929ef47ccebba3bd970.tar.xz
linux-dev-5df1673f1de2b6dad614c929ef47ccebba3bd970.zip
IB/qib: Use rdmavt device allocation function
No longer do drivers need to call into the IB core to allocate the verbs device. Use the functionality provided by rdmavt. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qib')
-rw-r--r--drivers/infiniband/hw/qib/qib_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c
index 5087a1f808c0..a3c74bb4df62 100644
--- a/drivers/infiniband/hw/qib/qib_init.c
+++ b/drivers/infiniband/hw/qib/qib_init.c
@@ -1131,9 +1131,12 @@ struct qib_devdata *qib_alloc_devdata(struct pci_dev *pdev, size_t extra)
{
unsigned long flags;
struct qib_devdata *dd;
- int ret;
+ int ret, nports;
- dd = (struct qib_devdata *) ib_alloc_device(sizeof(*dd) + extra);
+ /* extra is * number of ports */
+ nports = extra / sizeof(struct qib_pportdata);
+ dd = (struct qib_devdata *)rvt_alloc_device(sizeof(*dd) + extra,
+ nports);
if (!dd)
return ERR_PTR(-ENOMEM);