diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-22 22:07:23 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 02:37:28 +0100 |
commit | 5df1673f1de2b6dad614c929ef47ccebba3bd970 (patch) | |
tree | 653bbe08880cf434c2e578c8c89e34f9ee055ec5 /drivers/infiniband | |
parent | IB/rdmavt: Add support for rvt_query_qp (diff) | |
download | linux-5df1673f1de2b6dad614c929ef47ccebba3bd970.tar.xz linux-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')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_init.c | 7 |
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); |