Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3466784pxj; Sun, 20 Jun 2021 22:15:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIfuxYBdYQAJnH8LCt6Z8cefPrsJyyJL5n8+rROXdF+d9ASekhjTxcl79fNNqUnQfBn54n X-Received: by 2002:a05:6e02:1bab:: with SMTP id n11mr4285699ili.95.1624252552602; Sun, 20 Jun 2021 22:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624252552; cv=none; d=google.com; s=arc-20160816; b=be3ulCWNK0X+eDu57b3jNkrDXoXMvMnzGYYJB13ngHf642Ip5r/N7PQ3DTx56rbFT2 eio9vxumNrVWThaDUQdVaQWbmNgkbsvy/E0w0ALx06TKRdQ1lLMgvj44gNaP8Y50PpJP F22rkvN2h55ab+plOeMaj/QgomuN9s9Kw/ETLuTrS3fYG7vbHdiic2XrI+GUPGaiiMXG 9FwkARAoxUsMMu8rh0Ma4FWgIxmlReTiw9s2tA5lVrnpLz/zkMDyRRfG7XDqnr8dlEkg Px/sJOxFdLa5z3dZA++x4SVjkJ65xA+1g/R1uO9tWPWwouoyKZ1tUo2gOk+Rmkv4pqhJ uJbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=uD2xgijxF20/e8EVumPCrz2Akskz7eMKDXgfZx/8/2Y=; b=ld8j2TIdxBJhhpkB2I7ixcILGfaz1JC+N0lvvo8VnmYsMRjo238m0dtvu26kVLXyNU y7GAjaiII69i3Lo30MPfcT+X7N1GDMDBh1/5WpOUKZMaI4eJW55f+OT12yA21ZUsugOa VH8SV9ECTNdRE3GwN3bI6f+br1bBXkozov5NGgfcAW3M2tY7J1/G/tYiUVTthfIL7e02 XjUA5LvNJBS0gKPYp8KYjNXq2ylLFn5ASCpJ53sZnXPK2gqaJ8R7x/+ky5lQX+9lMXL2 ST2YaXdwytmy7I6ctPQdmHzW51dssAl4U/jpUynwwylWXWHiEkZeSVKBFNTT43EQrJHt ysSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TVCU1PiY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si3302989ilh.27.2021.06.20.22.15.41; Sun, 20 Jun 2021 22:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TVCU1PiY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbhFUFRT (ORCPT + 99 others); Mon, 21 Jun 2021 01:17:19 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:11127 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbhFUFRS (ORCPT ); Mon, 21 Jun 2021 01:17:18 -0400 Received: from epcas3p4.samsung.com (unknown [182.195.41.22]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210621051503epoutp04374aa1e63335c229517786e04860adfe~KgQvqiBSc0437504375epoutp04r for ; Mon, 21 Jun 2021 05:15:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210621051503epoutp04374aa1e63335c229517786e04860adfe~KgQvqiBSc0437504375epoutp04r DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1624252503; bh=uD2xgijxF20/e8EVumPCrz2Akskz7eMKDXgfZx/8/2Y=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=TVCU1PiYZJfybdeZWAjw1ma2fO1vPfgyJf6+zMy3RCfdjR33QNjSCnQz6IZWyeWES LpicTNlGq/aYMpVkMed482M79kWccpB7Ek1P4er2wKalpYSwS5wt/gJu2XoPvMJEVp HPJ4KZ70JKKYtiJDLFGMUqRk9vtxH+7v9K0rwSwA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas3p3.samsung.com (KnoxPortal) with ESMTP id 20210621051502epcas3p3d7db52aae5faddf082c536938bcb1297~KgQuleu1Y0704507045epcas3p34; Mon, 21 Jun 2021 05:15:02 +0000 (GMT) Received: from epcpadp3 (unknown [182.195.40.17]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4G7d52499bz4x9Q7; Mon, 21 Jun 2021 05:15:02 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [PATCH v11 12/12] scsi: ufshpb: Make host mode parameters configurable Reply-To: daejun7.park@samsung.com Sender: Daejun Park From: Daejun Park To: "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "gregkh@linuxfoundation.org" , Bart Van Assche , yongmyung lee , Daejun Park , ALIM AKHTAR , "asutoshd@codeaurora.org" , Zang Leigang , Avi Shchislowski , Bean Huo , "cang@codeaurora.org" , "stanley.chu@mediatek.com" , Avri Altman X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20210616112800.52963-13-avri.altman@wdc.com> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <2038148563.21624252502579.JavaMail.epsvc@epcpadp3> Date: Mon, 21 Jun 2021 14:12:31 +0900 X-CMS-MailID: 20210621051231epcms2p8f48a5f2c5b39d8d72544188131d99740 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20210616113004epcas2p41cf111449e118965ae71aaaee1d3bd5c References: <20210616112800.52963-13-avri.altman@wdc.com> <20210616112800.52963-1-avri.altman@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, >diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs >index d001f008312b..b10cecb286df 100644 >--- a/Documentation/ABI/testing/sysfs-driver-ufs >+++ b/Documentation/ABI/testing/sysfs-driver-ufs >@@ -1449,7 +1449,7 @@ Description: This entry shows the maximum HPB data size for using single HPB > > The file is read only. > >-What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable >+What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable This part seems to be the problem with my patch. I will correct it. ... >diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c >index ab66919f4065..6f2ded8c63b0 100644 >--- a/drivers/scsi/ufs/ufshpb.c >+++ b/drivers/scsi/ufs/ufshpb.c ... >@@ -1697,6 +1704,7 @@ static void ufshpb_normalization_work_handler(struct work_struct *work) > struct ufshpb_lu *hpb = container_of(work, struct ufshpb_lu, > ufshpb_normalization_work); > int rgn_idx; >+ u8 factor = hpb->params.normalization_factor; > > for (rgn_idx = 0; rgn_idx < hpb->rgns_per_lu; rgn_idx++) { > struct ufshpb_region *rgn = hpb->rgn_tbl + rgn_idx; >@@ -1707,7 +1715,7 @@ static void ufshpb_normalization_work_handler(struct work_struct *work) > for (srgn_idx = 0; srgn_idx < hpb->srgns_per_rgn; srgn_idx++) { > struct ufshpb_subregion *srgn = rgn->srgn_tbl + srgn_idx; > >- srgn->reads >>= 1; >+ srgn->reads >>= factor; > rgn->reads += srgn->reads; How about changing it to "rgn->read >>=factor" and placing it outside the for statement? Thanks, Daejun