From patchwork Sun Dec 24 10:39:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia-Ju Bai X-Patchwork-Id: 10131933 X-Patchwork-Delegate: dledford@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA54E6037D for ; Sun, 24 Dec 2017 10:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE22A28E41 for ; Sun, 24 Dec 2017 10:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0E5328E43; Sun, 24 Dec 2017 10:37:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F30128D6E for ; Sun, 24 Dec 2017 10:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbdLXKgr (ORCPT ); Sun, 24 Dec 2017 05:36:47 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:47085 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdLXKgr (ORCPT ); Sun, 24 Dec 2017 05:36:47 -0500 Received: by mail-pl0-f68.google.com with SMTP id i6so15404791plt.13; Sun, 24 Dec 2017 02:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hhEZ9gmCrcC50oXCqA0aPMQs9jl/QK0JuITJWVuI6C4=; b=EkZhsejj9drnc0/ccSf8CVI80mS7wtA+JSygCwVwGv9oOpx3tDYhTLhRfiV+UHB87c 4azyr/X7FN44Sv+bvIfO9SaGEEyRMBfb7q2lEVpZmIGnSkkQATKE21IwPr8gGQsAYVJp /WCrCZx6s9a8+geEf/hbzb5q1h2vlEfQOXQpdaWKX6Lmtz/F+W02zlgoRkVIkxHSJ9qw Jimwet0OZfT/KnqryYLKYgTseW80KtLjhHlimY8hAmUhREAFH9aJeqPicSn5RejqODDU WysxcSsYnzvshE6dCZuVTK5ZCppBe4PJBKStc4EYX6au7VQxjURF9uoiNO27LPvzVnxG nDrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hhEZ9gmCrcC50oXCqA0aPMQs9jl/QK0JuITJWVuI6C4=; b=kphli5HMc8xxCU7nRu5gXWNo/+EtHqgB/678FGSOXLXehZTC1tZHDZY8n09QQdhlsf MR5z1cIePzJ9TAflkBCp+D5wgE4zP8aMtoTOQ+7+mGFoA7PhVdPW5APj3x799ItJqQHW pc6Ays97BbBLqWAgAaM16wdBHSp2OenR1il5jHKzc16CwxbQ6VVCbltoo0msf3qa34sX R/lToOwy5TJ9RICFmnUFASiL7SwQPwR/IXteJYqOJgf7pO+o61YCeMS251dGv2Y0XoyX +mnLDWjn+vGjFufmInAko1CkIvUXk+8b7jIf9Kug13Osv4IP952394rgpYOrEBmluvAq oblg== X-Gm-Message-State: AKGB3mLIvqptvo8GYcctlRDZJ0Bf3mmaKERYyc/NgM7IZh0LfX91Qb8K f+KkdlMsjwNrTqHLFQ5PwnQ= X-Google-Smtp-Source: ACJfBovHLnybSEEq19Y4Y//JdvSDipgDwyDX1HYpBZlIIpA82QgWpyZ7Ud3U4Mlh3hM1PHqCHc7sgA== X-Received: by 10.84.160.203 with SMTP id v11mr19452142plg.412.1514111806543; Sun, 24 Dec 2017 02:36:46 -0800 (PST) Received: from bai-oslab.tsinghua.edu.cn ([2402:f000:1:4413:459c:3cec:e067:3081]) by smtp.gmail.com with ESMTPSA id j13sm46065181pff.131.2017.12.24.02.36.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Dec 2017 02:36:46 -0800 (PST) From: Jia-Ju Bai To: faisal.latif@intel.com, shiraz.saleem@intel.com, dledford@redhat.com, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready Date: Sun, 24 Dec 2017 18:39:40 +0800 Message-Id: <1514111980-30502-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP i40iw_wait_pe_ready is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai Reviewed-by: Leon Romanovsky Acked-by: Shiraz Saleem --- drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index e824296..8098bc1 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c @@ -1285,7 +1285,7 @@ static void i40iw_wait_pe_ready(struct i40iw_hw *hw) __LINE__, statuscpu2); if ((statuscpu0 == 0x80) && (statuscpu1 == 0x80) && (statuscpu2 == 0x80)) break; /* SUCCESS */ - mdelay(1000); + msleep(1000); retrycount++; } while (retrycount < 14); i40iw_wr32(hw, 0xb4040, 0x4C104C5);