mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: "daejun7.park@samsung.com" <daejun7.park@samsung.com>,
	ALIM AKHTAR <alim.akhtar@samsung.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	Keoseong Park <keosung.park@samsung.com>,
	"huobean@gmail.com" <huobean@gmail.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] scsi: ufs: ufshpb: Use proper power management API
Date: Tue, 14 Sep 2021 08:41:44 +0000	[thread overview]
Message-ID: <DM6PR04MB6575EFE1EED8D52FFA81BC5BFCDA9@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20210902003534epcms2p1937a0f0eeb48a441cb69f5ef13ff8430@epcms2p1>

 
> In ufshpb, pm_runtime_{get,put}_sync() are used to avoid unwanted runtime
> suspend during query requests. In commit b294ff3e3449 ("scsi: ufs: core:
> Enable power management for wlun") has been modified to use
> ufshcd_rpm_{get,put}_sync() APIs.
> 
> This patch has been modified to use these APIs in HPB module.
> 
> Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>


> ---
>  drivers/scsi/ufs/ufshpb.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
> index 02fb51ae8b25..9ea639bf6a59 100644
> --- a/drivers/scsi/ufs/ufshpb.c
> +++ b/drivers/scsi/ufs/ufshpb.c
> @@ -2650,11 +2650,11 @@ static int ufshpb_get_lu_info(struct ufs_hba *hba,
> int lun,
> 
>         ufshcd_map_desc_id_to_length(hba, QUERY_DESC_IDN_UNIT, &size);
> 
> -       pm_runtime_get_sync(hba->dev);
> +       ufshcd_rpm_get_sync(hba);
>         ret = ufshcd_query_descriptor_retry(hba,
> UPIU_QUERY_OPCODE_READ_DESC,
>                                             QUERY_DESC_IDN_UNIT, lun, 0,
>                                             desc_buf, &size);
> -       pm_runtime_put_sync(hba->dev);
> +       ufshcd_rpm_put_sync(hba);
> 
>         if (ret) {
>                 dev_err(hba->dev,
> @@ -2877,10 +2877,10 @@ void ufshpb_get_dev_info(struct ufs_hba *hba, u8
> *desc_buf)
>         if (version == HPB_SUPPORT_LEGACY_VERSION)
>                 hpb_dev_info->is_legacy = true;
> 
> -       pm_runtime_get_sync(hba->dev);
> +       ufshcd_rpm_get_sync(hba);
>         ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
>                 QUERY_ATTR_IDN_MAX_HPB_SINGLE_CMD, 0, 0,
> &max_hpb_single_cmd);
> -       pm_runtime_put_sync(hba->dev);
> +       ufshcd_rpm_put_sync(hba);
> 
>         if (ret)
>                 dev_err(hba->dev, "%s: idn: read max size of single hpb cmd query
> request failed",
> --
> 2.25.1


  reply	other threads:[~2021-09-14  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210902003534epcms2p1937a0f0eeb48a441cb69f5ef13ff8430@epcms2p1>
2021-09-02  0:35 ` Daejun Park
2021-09-14  8:41   ` Avri Altman [this message]
2021-09-15  3:29   ` Martin K. Petersen
2021-09-22  4:45   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR04MB6575EFE1EED8D52FFA81BC5BFCDA9@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=daejun7.park@samsung.com \
    --cc=huobean@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=keosung.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®