summaryrefslogtreecommitdiffstats
path: root/include/rdma/rdma_vt.h
diff options
context:
space:
mode:
authorMichael J. Ruhl <michael.j.ruhl@intel.com>2017-12-19 04:56:44 +0100
committerDoug Ledford <dledford@redhat.com>2018-01-05 19:34:55 +0100
commit06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3 (patch)
treed2762276907fbec34b519ce50b8050ab3dc141d9 /include/rdma/rdma_vt.h
parentIB/{rdmavt, hfi1, qib}: Self determine driver name (diff)
downloadlinux-06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3.tar.xz
linux-06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3.zip
IB/{rdmavt, hfi1, qib}: Remove get_card_name() downcall
rdmavt has a down call to client drivers to retrieve a crafted card name. This name should be the IB defined name. Rather than craft the name each time it is needed, simply retrieve the IB allocated name from the IB device. Update the function name to reflect its application. Clean up driver code to match this change. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/rdma_vt.h')
-rw-r--r--include/rdma/rdma_vt.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index b57784e30668..4118324a0310 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -228,13 +228,6 @@ struct rvt_driver_provided {
int (*port_callback)(struct ib_device *, u8, struct kobject *);
/*
- * Returns a string to represent the device for which is being
- * registered. This is primarily used for error and debug messages on
- * the console.
- */
- const char * (*get_card_name)(struct rvt_dev_info *rdi);
-
- /*
* Returns a pointer to the undelying hardware's PCI device. This is
* used to display information as to what hardware is being referenced
* in an output message
@@ -432,6 +425,17 @@ static inline void rvt_set_ibdev_name(struct rvt_dev_info *rdi,
snprintf(rdi->ibdev.name, sizeof(rdi->ibdev.name), fmt, name, unit);
}
+/**
+ * rvt_get_ibdev_name - return the IB name
+ * @rdi: rdmavt device
+ *
+ * Return the registered name of the device.
+ */
+static inline const char *rvt_get_ibdev_name(const struct rvt_dev_info *rdi)
+{
+ return rdi->ibdev.name;
+}
+
static inline struct rvt_pd *ibpd_to_rvtpd(struct ib_pd *ibpd)
{
return container_of(ibpd, struct rvt_pd, ibpd);