From: Asutosh Das <asutoshd@codeaurora.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: "cang@codeaurora.org" <cang@codeaurora.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Bean Huo <beanhuo@micron.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
Kiwoong Kim <kwmad.kim@samsung.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Satya Tangirala <satyat@google.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun
Date: Tue, 16 Feb 2021 09:36:46 -0800 [thread overview]
Message-ID: <20210216173646.GA35819@stor-presley.qualcomm.com> (raw)
In-Reply-To: <DM6PR04MB65758E0EBF4171FD6E1CF0CFFC8A9@DM6PR04MB6575.namprd04.prod.outlook.com>
On Sat, Feb 13 2021 at 13:37 -0800, Avri Altman wrote:
>> + } else {
>Is it possible to get here?
>Scsi_scan_host is called only after successful add_wluns
It looks so.
scsi 0:0:0:49488: Link setup for lun - ufshcd_setup_links
[...]
Call trace:
dump_backtrace+0x0/0x1d4
show_stack+0x18/0x24
dump_stack+0xc4/0x144
ufshcd_setup_links+0xd8/0x100
ufshcd_slave_alloc+0x134/0x1a0
scsi_alloc_sdev+0x1c0/0x230
scsi_probe_and_add_lun+0xc0/0xd48
__scsi_add_device+0xc0/0x138
ufshcd_scsi_add_wlus+0x30/0x1c0
ufshcd_async_scan+0x58/0x240
async_run_entry_fn+0x48/0x128
process_one_work+0x1f0/0x470
worker_thread+0x26c/0x4c8
kthread+0x13c/0x320
ret_from_fork+0x10/0x18
>
>> + /* device wlun is probed */
>> + hba->luns_avail--;
>> + }
>> +}
>> +
>
>
>>
>> /**
>> @@ -7254,6 +7312,14 @@ static int ufshcd_scsi_add_wlus(struct ufs_hba
>> *hba)
>> goto out;
>> }
>> ufshcd_blk_pm_runtime_init(hba->sdev_ufs_device);
>> + /*
>> + * A pm_runtime_put_sync is invoked when this device enables
>> blk_pm_runtime
>> + * & would suspend the device-wlun upon timer expiry.
>> + * But suspending device wlun _may_ put the ufs device in the pre-defined
>> + * low power mode (SSU <rpm_lvl>). Probing of other luns may fail then.
>> + * Don't allow this suspend until all the luns have been probed.
>Maybe add one more sentence: see pm_runtime_mark_last_busy in ufshcd_setup_links
Done.
>
>
>
>> - ufshcd_clear_ua_wluns(hba);
>Are there any callers left to ufshcd_clear_ua_wluns?
>Can it be removed?
Let me check.
>
>> + if (hba->wlun_dev_clr_ua)
>> + ufshcd_clear_ua_wlun(hba, UFS_UPIU_UFS_DEVICE_WLUN);
>>
>> cmd[4] = pwr_mode << 4;
next prev parent reply other threads:[~2021-02-16 17:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 19:18 [RFC PATCH v3 0/1] Enable power management for ufs wlun Asutosh Das
2021-02-11 19:18 ` [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun Asutosh Das
2021-02-13 3:25 ` Bart Van Assche
2021-02-16 17:38 ` Asutosh Das
2021-02-13 21:37 ` Avri Altman
2021-02-16 17:36 ` Asutosh Das [this message]
2021-02-17 22:29 ` Asutosh Das
2021-02-19 8:35 ` Adrian Hunter
2021-02-19 18:18 ` Asutosh Das
2021-02-13 20:51 ` [RFC PATCH v3 0/1] Enable power management for ufs wlun Avri Altman
2021-02-14 7:48 ` Avri Altman
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=20210216173646.GA35819@stor-presley.qualcomm.com \
--to=asutoshd@codeaurora.org \
--cc=Avri.Altman@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=kwmad.kim@samsung.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=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=satyat@google.com \
--cc=stanley.chu@mediatek.com \
--cc=stern@rowland.harvard.edu \
/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