Commit 6a9df403 authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford

IB/qib: Add device specific info prints

Implement get_card_name and get_pci_dev helper functions for rdmavt
for qib.
Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ffc26907
...@@ -1455,6 +1455,8 @@ u64 qib_sps_ints(void); ...@@ -1455,6 +1455,8 @@ u64 qib_sps_ints(void);
dma_addr_t qib_map_page(struct pci_dev *, struct page *, unsigned long, dma_addr_t qib_map_page(struct pci_dev *, struct page *, unsigned long,
size_t, int); size_t, int);
const char *qib_get_unit_name(int unit); const char *qib_get_unit_name(int unit);
const char *qib_get_card_name(struct rvt_dev_info *rdi);
struct pci_dev *qib_get_pci_dev(struct rvt_dev_info *rdi);
/* /*
* Flush write combining store buffers (if present) and perform a write * Flush write combining store buffers (if present) and perform a write
......
...@@ -90,6 +90,22 @@ const char *qib_get_unit_name(int unit) ...@@ -90,6 +90,22 @@ const char *qib_get_unit_name(int unit)
return iname; 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. * Return count of units with at least one port ACTIVE.
*/ */
......
...@@ -2244,6 +2244,8 @@ int qib_register_ib_device(struct qib_devdata *dd) ...@@ -2244,6 +2244,8 @@ int qib_register_ib_device(struct qib_devdata *dd)
* Fill in rvt info object. * Fill in rvt info object.
*/ */
dd->verbs_dev.rdi.driver_f.port_callback = qib_create_port_files; dd->verbs_dev.rdi.driver_f.port_callback = qib_create_port_files;
dd->verbs_dev.rdi.driver_f.get_card_name = qib_get_card_name;
dd->verbs_dev.rdi.driver_f.get_pci_dev = qib_get_pci_dev;
dd->verbs_dev.rdi.dparms.props.max_pd = ib_qib_max_pds; dd->verbs_dev.rdi.dparms.props.max_pd = ib_qib_max_pds;
dd->verbs_dev.rdi.flags = (RVT_FLAG_MR_INIT_DRIVER | dd->verbs_dev.rdi.flags = (RVT_FLAG_MR_INIT_DRIVER |
RVT_FLAG_QP_INIT_DRIVER | RVT_FLAG_QP_INIT_DRIVER |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment