From patchwork Wed Jan 6 05:04:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 12000989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BC6CC433DB for ; Wed, 6 Jan 2021 05:08:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C07B207B2 for ; Wed, 6 Jan 2021 05:08:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C07B207B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FAfCSDCxatCuC2WiDR770hXQIwBFanbUKvprcExD9/U=; b=d9GTC8ctEBCsblQX8vB4BYZoYF /2G0Jn5O07WnbtgYVeYss+OSXXlhu6x20h/tJfZ+hc/qnom2itTNihj3W8R27U0dNPXCTryXK69Ue 4pOd/fe5gldaAamZvcaEz8AASIsdT3s2jE8KipidiChOXcpi91xaiVwTLzu/Icq8vecuLYjbqVLNd ag84YsLslGQoaq4OOqbEIxLso4zb26ugZsL1JsY7fAvgJly8PgqPUdxdBR0Y9mfVdazN4vHJHUXDQ pgdlBtE541jX+3fx7DutSd2OcBGf2yZL+ciluFw4M3h6tmu+RKoALVTEG3FSiH3pPa8BNfWf3FxkA BksslRLw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx10W-0001EF-Vh; Wed, 06 Jan 2021 05:05:17 +0000 Received: from labrats.qualcomm.com ([199.106.110.90]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx10T-0001D6-5z; Wed, 06 Jan 2021 05:05:14 +0000 IronPort-SDR: y8JUEaQc1rQCL3+7rCWKK9GYBHItmixqeMcATQBxIhUwWuLAWTSdijCya1VWRse3wPkoOXI/DZ VJod85nS+MFN7sMukTyUbNwfwM/Amm8eOyYDmsRMFx8iFzpOD1rhNm15ddT79lmOYqw52c/atF wnfJMlkIXECRkGqMsSIUgvzFje8ZWdc/n7pZziXCOQdRvY0kI+89/2qV0Pc8EKPoVBoxFxBWpk SGwHleeAfY0BR6TpQgMyN7pOl63LGhCtv3u8v7gpp6cO37lO3EhJ8LSjvpl0hWQSRCl/JAxjjJ +9Q= X-IronPort-AV: E=Sophos;i="5.78,479,1599548400"; d="scan'208";a="29494651" Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by labrats.qualcomm.com with ESMTP; 05 Jan 2021 21:05:08 -0800 X-QCInternal: smtphost Received: from wsp769891wss.qualcomm.com (HELO stor-presley.qualcomm.com) ([192.168.140.85]) by ironmsg03-sd.qualcomm.com with ESMTP; 05 Jan 2021 21:05:07 -0800 Received: by stor-presley.qualcomm.com (Postfix, from userid 359480) id 2011D218E2; Tue, 5 Jan 2021 21:05:08 -0800 (PST) From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Subject: [PATCH v9 3/3] scsi: ufs: Revert "Make sure clk scaling happens only when HBA is runtime ACTIVE" Date: Tue, 5 Jan 2021 21:04:45 -0800 Message-Id: <1609909486-21053-4-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609909486-21053-1-git-send-email-cang@codeaurora.org> References: <1609909486-21053-1-git-send-email-cang@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_000513_377258_377BA820 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Martin K. Petersen" , "James E.J. Bottomley" , open list , Avri Altman , "moderated list:ARM/Mediatek SoC support" , Alim Akhtar , Matthias Brugger , Stanley Chu , "moderated list:ARM/Mediatek SoC support" , Bean Huo MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 73cc291c27024 ("Make sure clk scaling happens only when HBA is runtime ACTIVE") is no longer needed since commit f7a42540928a8 ("scsi: ufs: Protect some contexts from unexpected clock scaling") is a more mature fix to protect UFS LLD stability from clock scaling invoked through sysfs nodes by users. Reviewed-by: Stanley Chu Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index d239370..c4dbeec 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1338,15 +1338,8 @@ static int ufshcd_devfreq_target(struct device *dev, } spin_unlock_irqrestore(hba->host->host_lock, irq_flags); - pm_runtime_get_noresume(hba->dev); - if (!pm_runtime_active(hba->dev)) { - pm_runtime_put_noidle(hba->dev); - ret = -EAGAIN; - goto out; - } start = ktime_get(); ret = ufshcd_devfreq_scale(hba, scale_up); - pm_runtime_put(hba->dev); trace_ufshcd_profile_clk_scaling(dev_name(hba->dev), (scale_up ? "up" : "down"),