From patchwork Thu Mar 4 18:18:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 83667 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 o24IISv5004497 for ; Thu, 4 Mar 2010 18:18:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754500Ab0CDSSU (ORCPT ); Thu, 4 Mar 2010 13:18:20 -0500 Received: from smtp.opengridcomputing.com ([209.198.142.2]:55333 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754296Ab0CDSST (ORCPT ); Thu, 4 Mar 2010 13:18:19 -0500 Received: from build.ogc.int (build.ogc.int [10.10.0.2]) by smtp.opengridcomputing.com (Postfix) with ESMTP id 9E4707C770; Thu, 4 Mar 2010 12:18:18 -0600 (CST) From: Steve Wise Subject: [PATCH] ib_mad: Ignore iWARP devices on device removal. To: rdreier@cisco.com Cc: hal.rosenstock@gmail.com, sean.hefty@intel.com, linux-rdma@vger.kernel.org Date: Thu, 04 Mar 2010 12:18:18 -0600 Message-ID: <20100304181818.18953.44421.stgit@build.ogc.int> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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, 04 Mar 2010 18:18:28 +0000 (UTC) diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 7522008..6216187 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -2964,6 +2964,9 @@ static void ib_mad_remove_device(struct ib_device *device) { int i, num_ports, cur_port; + if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB) + return; + if (device->node_type == RDMA_NODE_IB_SWITCH) { num_ports = 1; cur_port = 0;