From: chun-hung.wu <chun-hung.wu@mediatek.com>
To: <peter.wang@mediatek.com>, <linux-scsi@vger.kernel.org>,
<martin.petersen@oracle.com>, <avri.altman@sandisk.com>,
<alim.akhtar@samsung.com>, <bvanassche@acm.org>,
<santosh.sy@samsung.com>, <h.vinayak@samsung.com>
Cc: <wsd_upstream@mediatek.com>, <linux-mediatek@lists.infradead.org>,
<alice.chao@mediatek.com>, <cc.chou@mediatek.com>,
<chaotian.jing@mediatek.com>, <tun-yu.yu@mediatek.com>,
<naomi.chu@mediatek.com>, <ed.tsai@mediatek.com>
Subject: Re: [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition
Date: Tue, 22 Sep 2026 18:06:53 +0800 [thread overview]
Message-ID: <0fc34494c4d37c1ab15db32d021d3f96869bab78.camel@mediatek.com> (raw)
In-Reply-To: <20260914085148.136429-1-peter.wang@mediatek.com>
On Mon, 2026-09-14 at 16:49 +0800, peter.wang@mediatek.com wrote:
> From: Peter Wang <peter.wang@mediatek.com>
>
> Patch 1 fixes a bug where POST_CHANGE was skipped on a failed gear
> switch, leaving the host in an inconsistent state if resources
> acquired
> in PRE_CHANGE were never released.
>
> Patch 2 fixes a race between the sysfs AHIT update path and the
> MediaTek host driver's power mode change path. A mutex and depth
> counter are introduced to serialize AHIT register access and ensure
> AHIT is correctly restored after the last disabler completes.
>
> The two patches are related: patch 1 guarantees POST_CHANGE is always
> called, ensuring the depth counter introduced in patch 2 is always
> properly decremented.
>
> Peter Wang (2):
> ufs: always notify POST_CHANGE even on gear switch failure
> ufs: serialize AHIT register access between sysfs and host driver
>
> drivers/ufs/core/ufshcd.c | 22 +++++++++++++++++++---
> drivers/ufs/host/ufs-exynos.c | 4 +++-
> drivers/ufs/host/ufs-mediatek.c | 16 ++++++++++++----
> drivers/ufs/host/ufshcd-pci.c | 3 ++-
> include/ufs/ufshcd.h | 8 ++++++++
> 5 files changed, 44 insertions(+), 9 deletions(-)
>
Reviewed-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
next prev parent reply other threads:[~2026-09-22 10:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 8:49 [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition peter.wang
2026-09-14 8:49 ` [PATCH v2 1/2] ufs: always notify POST_CHANGE even on gear switch failure peter.wang
2026-09-14 9:02 ` sashiko-bot
2026-09-14 12:42 ` Peter Wang (王信友)
2026-09-14 8:49 ` [PATCH v2 2/2] ufs: serialize AHIT register access between sysfs and host driver peter.wang
2026-09-14 9:13 ` sashiko-bot
2026-09-14 12:44 ` Peter Wang (王信友)
2026-09-22 10:06 ` chun-hung.wu [this message]
2026-09-26 2:30 ` [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition Martin K. Petersen (Oracle)
2026-10-05 15:45 ` Sandeep Dhavale
2026-10-06 2:42 ` Martin K. Petersen
2026-10-06 2:44 ` Martin K. Petersen (Oracle)
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=0fc34494c4d37c1ab15db32d021d3f96869bab78.camel@mediatek.com \
--to=chun-hung.wu@mediatek.com \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@sandisk.com \
--cc=bvanassche@acm.org \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=ed.tsai@mediatek.com \
--cc=h.vinayak@samsung.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=santosh.sy@samsung.com \
--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