summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_driver.c
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-22 21:45:20 +0100
committerDoug Ledford <dledford@redhat.com>2016-03-11 02:37:17 +0100
commit6a9df403c9d3e37b79d6dac83922d2b4647f4dc8 (patch)
tree2fbf74a95b1f5fe11e0093adf4f3f7bf7a599636 /drivers/infiniband/hw/qib/qib_driver.c
parentIB/qib: Remove driver specific members from qib qp type (diff)
downloadlinux-6a9df403c9d3e37b79d6dac83922d2b4647f4dc8.tar.xz
linux-6a9df403c9d3e37b79d6dac83922d2b4647f4dc8.zip
IB/qib: Add device specific info prints
Implement get_card_name and get_pci_dev helper functions for rdmavt for qib. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@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/qib_driver.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_driver.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qib/qib_driver.c b/drivers/infiniband/hw/qib/qib_driver.c
index 57b19ead7776..ae5a7250f294 100644
--- a/drivers/infiniband/hw/qib/qib_driver.c
+++ b/drivers/infiniband/hw/qib/qib_driver.c
@@ -90,6 +90,22 @@ const char *qib_get_unit_name(int unit)
return iname;
}
+const char *qib_get_card_name(struct rvt_dev_info *rdi)
+{
+ struct qib_ibdev *ibdev = container_of(rdi, struct qib_ibdev, rdi);
+ struct qib_devdata *dd = container_of(ibdev,
+ struct qib_devdata, verbs_dev);
+ return qib_get_unit_name(dd->unit);
+}
+
+struct pci_dev *qib_get_pci_dev(struct rvt_dev_info *rdi)
+{
+ struct qib_ibdev *ibdev = container_of(rdi, struct qib_ibdev, rdi);
+ struct qib_devdata *dd = container_of(ibdev,
+ struct qib_devdata, verbs_dev);
+ return dd->pcidev;
+}
+
/*
* Return count of units with at least one port ACTIVE.
*/