From: Adrian Hunter <adrian.hunter@intel.com>
To: Asutosh Das <asutoshd@codeaurora.org>,
cang@codeaurora.org, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Bean Huo <beanhuo@micron.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v17 2/2] ufs: sysfs: Resume the proper scsi device
Date: Sat, 10 Apr 2021 11:57:15 +0300 [thread overview]
Message-ID: <6784a588-b9ff-ebc5-8b34-785f5d3b04c5@intel.com> (raw)
In-Reply-To: <3f005b59d9d83c8a5cc7cb77b0c5b27c807d7430.1617893198.git.asutoshd@codeaurora.org>
On 8/04/21 5:49 pm, Asutosh Das wrote:
> Resumes the actual scsi device the unit descriptor of which
> is being accessed instead of the hba alone.
>
> Reviewed-by: Can Guo <cang@codeaurora.org>
> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
> ---
> drivers/scsi/ufs/ufs-sysfs.c | 30 +++++++++++++++++-------------
> 1 file changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c
> index d7c3cff..fa57bac 100644
> --- a/drivers/scsi/ufs/ufs-sysfs.c
> +++ b/drivers/scsi/ufs/ufs-sysfs.c
<SNIP>
> @@ -899,11 +899,15 @@ static ssize_t _pname##_show(struct device *dev, \
> struct scsi_device *sdev = to_scsi_device(dev); \
> struct ufs_hba *hba = shost_priv(sdev->host); \
> u8 lun = ufshcd_scsi_to_upiu_lun(sdev->lun); \
> + int ret; \
> if (!ufs_is_valid_unit_desc_lun(&hba->dev_info, lun, \
> _duname##_DESC_PARAM##_puname)) \
> return -EINVAL; \
> - return ufs_sysfs_read_desc_param(hba, QUERY_DESC_IDN_##_duname, \
> + scsi_autopm_get_device(sdev); \
> + ret = ufs_sysfs_read_desc_param(hba, QUERY_DESC_IDN_##_duname, \
> lun, _duname##_DESC_PARAM##_puname, buf, _size); \
> + scsi_autopm_put_device(sdev); \
> + return ret; \
I am not sure why this change is needed. It it is needed, please add
a comment explaining.
next prev parent reply other threads:[~2021-04-10 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1617893198.git.asutoshd@codeaurora.org>
2021-04-08 14:49 ` [PATCH v17 1/2] scsi: ufs: Enable power management for wlun Asutosh Das
2021-04-11 17:52 ` Adrian Hunter
2021-04-08 14:49 ` [PATCH v17 2/2] ufs: sysfs: Resume the proper scsi device Asutosh Das
2021-04-10 8:57 ` Adrian Hunter [this message]
[not found] ` <CGME20210408145007epcas2p1accfbd653b2e1318b2722c1f5661c1e0@epcms2p1>
2021-04-09 2:27 ` [PATCH v17 1/2] scsi: ufs: Enable power management for wlun Daejun Park
2021-04-09 10:07 ` Adrian Hunter
2021-04-09 17:15 ` Asutosh Das (asd)
2021-04-09 17:30 ` Adrian Hunter
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=6784a588-b9ff-ebc5-8b34-785f5d3b04c5@intel.com \
--to=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.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®