ufs: fix POST_CHANGE pairing and AHIT race condition
Status from this message: Applied to 7.4/scsi-staging, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ufs: always notify POST_CHANGE even on gear switch failuredrivers/ drivers/ drivers/ | +11 | 1 reply | |
| 2/2 | ufs: serialize AHIT register access between sysfs and host driverdrivers/ drivers/ include/ | +33 | 1 reply |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Chun-Hung Wu |
|---|---|
| Series | R-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition
From: Peter Wang <[email protected]>
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(-)
Signature · 1 line
2.45.2