From patchwork Wed Mar 3 15:06:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 83349 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 o23F6NWs013328 for ; Wed, 3 Mar 2010 15:06:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751367Ab0CCPGg (ORCPT ); Wed, 3 Mar 2010 10:06:36 -0500 Received: from smtp.opengridcomputing.com ([209.198.142.2]:47381 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426Ab0CCPGf (ORCPT ); Wed, 3 Mar 2010 10:06:35 -0500 Received: from build.ogc.int (build.ogc.int [10.10.0.2]) by smtp.opengridcomputing.com (Postfix) with ESMTP id C76037C75F; Wed, 3 Mar 2010 09:06:34 -0600 (CST) From: Steve Wise Subject: [PATCH] RDMA/cxgb3: wait at least one schedule cycle during device removal. To: rdreier@cisco.com Cc: linux-rdma@vger.kernel.org, wenxiong@us.ibm.com Date: Wed, 03 Mar 2010 09:06:34 -0600 Message-ID: <20100303150633.11256.9555.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]); Wed, 03 Mar 2010 15:06:36 +0000 (UTC) diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index ee1d8b4..63f975f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c @@ -189,6 +189,7 @@ static void close_rnic_dev(struct t3cdev *tdev) list_for_each_entry_safe(dev, tmp, &dev_list, entry) { if (dev->rdev.t3cdev_p == tdev) { dev->rdev.flags = CXIO_ERROR_FATAL; + synchronize_net(); cancel_delayed_work_sync(&dev->db_drop_task); list_del(&dev->entry); iwch_unregister_device(dev); @@ -217,6 +218,7 @@ static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id) switch (evt) { case OFFLOAD_STATUS_DOWN: { rdev->flags = CXIO_ERROR_FATAL; + synchronize_net(); event.event = IB_EVENT_DEVICE_FATAL; dispatch = 1; break;