From patchwork Thu Feb 18 17:24:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 80356 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1IHNWAx032700 for ; Thu, 18 Feb 2010 17:24:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758459Ab0BRRYP (ORCPT ); Thu, 18 Feb 2010 12:24:15 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:40086 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758385Ab0BRRYP (ORCPT ); Thu, 18 Feb 2010 12:24:15 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 18 Feb 2010 19:24:13 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Feb 2010 19:24:12 +0200 Date: Thu, 18 Feb 2010 19:24:20 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list , ewg Subject: [PATCHv8 06/11] ipoib: avoid ipoib over IBoE Message-ID: <20100218172420.GG12286@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 18 Feb 2010 17:24:12.0780 (UTC) FILETIME=[30398AC0:01CAB0BF] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17202.000 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 18 Feb 2010 17:24:16 +0000 (UTC) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 06014d2..5e6c2de 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();