From patchwork Tue Jan 5 10:33:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 70967 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o05AUSri031466 for ; Tue, 5 Jan 2010 10:31:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754202Ab0AEKbZ (ORCPT ); Tue, 5 Jan 2010 05:31:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754217Ab0AEKbZ (ORCPT ); Tue, 5 Jan 2010 05:31:25 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:44295 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754202Ab0AEKbY (ORCPT ); Tue, 5 Jan 2010 05:31:24 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 5 Jan 2010 12:31:22 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 5 Jan 2010 12:31:21 +0200 Date: Tue, 5 Jan 2010 12:33:15 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list Subject: [PATCHv7 6/9] ipoib: avoid ipoib over RoCEE Message-ID: <20100105103315.GH31480@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 05 Jan 2010 10:31:21.0761 (UTC) FILETIME=[395F0110:01CA8DF2] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17112.006 X-TM-AS-Result: No--8.404400-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index df3eb8c..359c91f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1362,6 +1362,8 @@ static void ipoib_add_one(struct ib_device *device) } for (p = s; p <= e; ++p) { + if (rdma_port_link_layer(device, p) != IB_LINK_LAYER_INFINIBAND) + continue; dev = ipoib_add_port("ib%d", device, p); if (!IS_ERR(dev)) { priv = netdev_priv(dev); @@ -1383,6 +1385,9 @@ static void ipoib_remove_one(struct ib_device *device) dev_list = ib_get_client_data(device, &ipoib_client); list_for_each_entry_safe(priv, tmp, dev_list, list) { + if (rdma_port_link_layer(device, priv->port) != IB_LINK_LAYER_INFINIBAND) + continue; + ib_unregister_event_handler(&priv->event_handler); rtnl_lock();