All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mike Marciniszyn
	<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Dennis Dalessandro
	<dennis.dalessandr-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [RFC PATCH 07/27] IB/hfi1: Add device specific info prints
Date: Sat, 09 Jan 2016 07:17:17 -0800	[thread overview]
Message-ID: <20160109151716.30800.67580.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20160109151020.30800.82395.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>

Implement get_card_name and get_pci_dev helper functions for rdmavt
for hfi1.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandr-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/staging/rdma/hfi1/driver.c |   16 ++++++++++++++++
 drivers/staging/rdma/hfi1/hfi.h    |    2 ++
 drivers/staging/rdma/hfi1/verbs.c  |    2 ++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/rdma/hfi1/driver.c b/drivers/staging/rdma/hfi1/driver.c
index ce69141..16ac8b6 100644
--- a/drivers/staging/rdma/hfi1/driver.c
+++ b/drivers/staging/rdma/hfi1/driver.c
@@ -162,6 +162,22 @@ const char *get_unit_name(int unit)
 	return iname;
 }
 
+const char *get_card_name(struct rvt_dev_info *rdi)
+{
+	struct hfi1_ibdev *ibdev = container_of(rdi, struct hfi1_ibdev, rdi);
+	struct hfi1_devdata *dd = container_of(ibdev,
+					       struct hfi1_devdata, verbs_dev);
+	return get_unit_name(dd->unit);
+}
+
+struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi)
+{
+	struct hfi1_ibdev *ibdev = container_of(rdi, struct hfi1_ibdev, rdi);
+	struct hfi1_devdata *dd = container_of(ibdev,
+					       struct hfi1_devdata, verbs_dev);
+	return dd->pcidev;
+}
+
 /*
  * Return count of units with at least one port ACTIVE.
  */
diff --git a/drivers/staging/rdma/hfi1/hfi.h b/drivers/staging/rdma/hfi1/hfi.h
index 1e3993f..c2f7bd0 100644
--- a/drivers/staging/rdma/hfi1/hfi.h
+++ b/drivers/staging/rdma/hfi1/hfi.h
@@ -1624,6 +1624,8 @@ int get_platform_config_field(struct hfi1_devdata *dd,
 dma_addr_t hfi1_map_page(struct pci_dev *, struct page *, unsigned long,
 			 size_t, int);
 const char *get_unit_name(int unit);
+const char *get_card_name(struct rvt_dev_info *rdi);
+struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi);
 
 /*
  * Flush write combining store buffers (if present) and perform a write
diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c
index 439c930..11540ed 100644
--- a/drivers/staging/rdma/hfi1/verbs.c
+++ b/drivers/staging/rdma/hfi1/verbs.c
@@ -2042,6 +2042,8 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
 	 * Fill in rvt info object.
 	 */
 	dd->verbs_dev.rdi.driver_f.port_callback = hfi1_create_port_files;
+	dd->verbs_dev.rdi.driver_f.get_card_name = get_card_name;
+	dd->verbs_dev.rdi.driver_f.get_pci_dev = get_pci_dev;
 	dd->verbs_dev.rdi.dparms.props.max_pd = hfi1_max_pds;
 	dd->verbs_dev.rdi.flags = (RVT_FLAG_MR_INIT_DRIVER |
 				   RVT_FLAG_QP_INIT_DRIVER |

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-01-09 15:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 15:16 [RFC PATCH 00/27] IB/hfi1: Add rdmavt support to hfi1 Dennis Dalessandro
     [not found] ` <20160109151020.30800.82395.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-01-09 15:16   ` [RFC PATCH 01/27] IB/hfi1: Begin to use rdmavt for verbs Dennis Dalessandro
2016-01-09 15:16   ` [RFC PATCH 02/27] IB/hfi1: Add basic rdmavt capability flags for hfi1 Dennis Dalessandro
2016-01-09 15:16   ` [RFC PATCH 03/27] IB/hfi1: Consolidate dma ops " Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 04/27] IB/hfi1: Use rdmavt protection domain Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 05/27] IB/hfi1: Remove MR data structures from hfi1 Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 06/27] IB/hfi1: Remove driver specific members from hfi1 qp type Dennis Dalessandro
2016-01-09 15:17   ` Dennis Dalessandro [this message]
2016-01-09 15:17   ` [RFC PATCH 08/27] IB/hfi1: Use correct rdmavt header files after move Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 09/27] IB/hfi1: Use address handle in rdmavt and remove from hfi1 Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 10/27] IB/hfi1: Implement hfi1 support for AH notification Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 11/27] IB/hfi1: Remove hfi1 MR and hfi1 specific qp type Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 12/27] IB/hfi1: Remove srq from hfi1 Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 13/27] IB/hfi1: Remove ibport and use rdmavt version Dennis Dalessandro
2016-01-09 15:17   ` [RFC PATCH 14/27] IB/hfi1: Remove mmap from hfi1 Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 15/27] IB/hfi1: Use rdmavt pkey verbs function Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 16/27] IB/hfi1: Remove user context allocation and de-alloction functions Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 17/27] IB/hfi1: Use rdmavt send flags and recv flags Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 18/27] IB/hfi1: Remove qpdev and qpn table from hfi1 Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 19/27] IB/hfi1: Remove create_qp functionality Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 20/27] IB/hfi1: Remove query_device function Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 21/27] IB/hfi1: Remove CQ data structures and functions from hfi1 Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 22/27] IB/hfi1: Use rdmavt version of post_send Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 23/27] IB/hfi1: Remove modify queue pair from hfi1 Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 24/27] IB/hfi1: Remove destroy qp verb Dennis Dalessandro
2016-01-09 15:18   ` [RFC PATCH 25/27] IB/hfi1: Remove post_recv and use rdmavt version Dennis Dalessandro
2016-01-09 15:19   ` [RFC PATCH 26/27] IB/hfi1: Remove multicast verbs functions Dennis Dalessandro
2016-01-09 15:19   ` [RFC PATCH 27/27] IB/hfi1: Clean up register device Dennis Dalessandro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160109151716.30800.67580.stgit@scvm10.sc.intel.com \
    --to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dennis.dalessandr-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.