From: Bean Huo <huobean@gmail.com>
To: peter.wang@mediatek.com, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com, avri.altman@wdc.com,
alim.akhtar@samsung.com, jejb@linux.ibm.com, beanhuo@micron.com
Cc: wsd_upstream@mediatek.com, linux-mediatek@lists.infradead.org,
chun-hung.wu@mediatek.com, alice.chao@mediatek.com,
cc.chou@mediatek.com, chaotian.jing@mediatek.com,
jiajie.hao@mediatek.com, powen.kao@mediatek.com,
qilin.tan@mediatek.com, lin.gui@mediatek.com,
tun-yu.yu@mediatek.com, eddie.huang@mediatek.com,
naomi.chu@mediatek.com, chu.stanley@gmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH v2] ufs: core: fix deadlock when rtc update
Date: Mon, 15 Jul 2024 11:29:19 +0200 [thread overview]
Message-ID: <68370e680ab4d39ce5710086ee62711b22ea48ee.camel@gmail.com> (raw)
In-Reply-To: <20240715063831.29792-1-peter.wang@mediatek.com>
On Mon, 2024-07-15 at 14:38 +0800, peter.wang@mediatek.com wrote:
> - ufshcd_rpm_get_sync(hba);
> + /* Skip update RTC if RPM state is not RPM_ACTIVE */
> + if (ufshcd_rpm_get_if_active(hba) <= 0)
> + return;
I understood your intention of this 'retun', but my understanding is
you assume that __ufshcd_wl_resume() will schedule rtc update work,
however, before the time that __ufshcd_wl_resume() completes, the RPM
status is not RPM_ACTIVE until __ufshcd_wl_resume() completes and
__update_runtime_status(dev, RPM_ACTIVE) is called.
If rtc update work is performed before __update_runtime_status(dev,
RPM_ACTIVE), here you return, then no RTC work will be scheduled.
do you think it is possible?
next prev parent reply other threads:[~2024-07-15 9:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 6:38 [PATCH v2] ufs: core: fix deadlock when rtc update peter.wang
2024-07-15 9:29 ` Bean Huo [this message]
2024-07-15 9:34 ` Bean Huo
2024-07-15 9:37 ` Bean Huo
2024-07-15 11:48 ` Peter Wang (王信友)
2024-07-15 17:17 ` Bart Van Assche
2024-07-16 2:03 ` Peter Wang (王信友)
2024-07-16 2:57 ` Martin K. Petersen
2024-07-23 1:23 ` 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=68370e680ab4d39ce5710086ee62711b22ea48ee.camel@gmail.com \
--to=huobean@gmail.com \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=chu.stanley@gmail.com \
--cc=chun-hung.wu@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=lin.gui@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=naomi.chu@mediatek.com \
--cc=peter.wang@mediatek.com \
--cc=powen.kao@mediatek.com \
--cc=qilin.tan@mediatek.com \
--cc=stable@vger.kernel.org \
--cc=tun-yu.yu@mediatek.com \
--cc=wsd_upstream@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