From patchwork Mon Jul 11 14:42:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Wen Kao X-Patchwork-Id: 590003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A457C433EF for ; Mon, 11 Jul 2022 14:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231182AbiGKOnD (ORCPT ); Mon, 11 Jul 2022 10:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbiGKOnA (ORCPT ); Mon, 11 Jul 2022 10:43:00 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4088F6714B; Mon, 11 Jul 2022 07:42:53 -0700 (PDT) X-UUID: d6f0f197ad0e4b9eb1096b437bc4e42b-20220711 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8, REQID:e14be492-6eeb-45ad-b03b-8953abdd6d2e, OB:0, LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-META: VersionHash:0f94e32, CLOUDID:513ffa63-0b3f-4b2c-b3a6-ed5c044366a0, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: d6f0f197ad0e4b9eb1096b437bc4e42b-20220711 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1736998879; Mon, 11 Jul 2022 22:42:47 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Mon, 11 Jul 2022 22:42:45 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 11 Jul 2022 22:42:45 +0800 From: Po-Wen Kao To: , Alim Akhtar , "Avri Altman" , "James E.J. Bottomley" , "Martin K. Petersen" , Matthias Brugger CC: , , , , , , , , , , , , , Subject: [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset Date: Mon, 11 Jul 2022 22:42:23 +0800 Message-ID: <20220711144224.17916-2-powen.kao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220711144224.17916-1-powen.kao@mediatek.com> References: <20220711144224.17916-1-powen.kao@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In ufshcd_host_reset_and_restore(), ufshcd_set_clk_freq() is called to scale clk rate. However, this did not call vops->clk_scale_notify() to inform platform driver of clk change. We propose to call on ufshcd_scale_clks() instead so that clk change can be properly handled. Signed-off-by: Po-Wen Kao --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3f9caafa91bf..3e7af7b11d2e 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7230,7 +7230,7 @@ static int ufshcd_host_reset_and_restore(struct ufs_hba *hba) hba->silence_err_logs = false; /* scale up clocks to max frequency before full reinitialization */ - ufshcd_set_clk_freq(hba, true); + ufshcd_scale_clks(hba, true); err = ufshcd_hba_enable(hba);