netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eli Cohen <eli@mellanox.co.il>
To: Roland Dreier <rdreier@cisco.com>
Cc: Linux RDMA list <linux-rdma@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, ewg <ewg@lists.openfabrics.org>
Subject: [PATCHv6 05/10] ib/cm: Enable CM support for RDMAoE
Date: Mon, 16 Nov 2009 17:53:43 +0200	[thread overview]
Message-ID: <20091116155343.GF2463@mtls03> (raw)

CM messages can be transported on RDMAoE protocol ports so they are enabled
here.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
---
 drivers/infiniband/core/cm.c  |    5 +++--
 drivers/infiniband/core/ucm.c |   12 +++++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index d082f59..c9f9122 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3680,7 +3680,8 @@ static void cm_add_one(struct ib_device *ib_device)
 	u8 i;
 	enum rdma_transport_type tt;
 
-	if (!rdma_is_transport_supported(ib_device, RDMA_TRANSPORT_IB))
+	if (!rdma_is_transport_supported(ib_device, RDMA_TRANSPORT_IB) &&
+	    !rdma_is_transport_supported(ib_device, RDMA_TRANSPORT_RDMAOE))
 		return;
 
 	cm_dev = kzalloc(sizeof(*cm_dev) + sizeof(*port) *
@@ -3702,7 +3703,7 @@ static void cm_add_one(struct ib_device *ib_device)
 	set_bit(IB_MGMT_METHOD_SEND, reg_req.method_mask);
 	for (i = 1; i <= ib_device->phys_port_cnt; i++) {
 		tt = rdma_port_get_transport(ib_device, i);
-		if (tt != RDMA_TRANSPORT_IB)
+		if (tt != RDMA_TRANSPORT_IB && tt != RDMA_TRANSPORT_RDMAOE)
 			continue;
 
 		port = kzalloc(sizeof *port, GFP_KERNEL);
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index 43700b4..dce2cbb 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1241,13 +1241,19 @@ static void ib_ucm_add_one(struct ib_device *device)
 {
 	struct ib_ucm_device *ucm_dev;
 	int i;
+	enum rdma_transport_type tt;
 
 	if (!device->alloc_ucontext)
 		return;
 
-	for (i = 1; i <= device->phys_port_cnt; ++i)
-		if (rdma_port_get_transport(device, i) != RDMA_TRANSPORT_IB)
-			return;
+	for (i = 1; i <= device->phys_port_cnt; ++i) {
+		tt = rdma_port_get_transport(device, i);
+		if (tt == RDMA_TRANSPORT_IB || tt == RDMA_TRANSPORT_RDMAOE)
+			break;
+	}
+
+	if (i > device->phys_port_cnt)
+		return;
 
 	ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL);
 	if (!ucm_dev)
-- 
1.6.5.2


                 reply	other threads:[~2009-11-16 15:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20091116155343.GF2463@mtls03 \
    --to=eli@mellanox.co.il \
    --cc=ewg@lists.openfabrics.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdreier@cisco.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).