Skip to content

scsi: ufs: Add error handling of Auto-Hibernate

Stanley Chu linux-arm-kernel linux-mediatek linux-scsi 5 versions – Applied

Status from this message: Applied to 5.3/scsi-queue, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 2 repliesApplied
  2. v43 patches 2 repliesSuperseded
  3. v33 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches8 repliesSuperseded
v13 patches7 repliesSuperseded

Changes in v5 from the cover letter

- Also re-factor checking of Auto-Hibernation support in other places, e.g., in ufshcd_auto_hibern8_enable() and in ufs-sysfs (Avri Altman)
- Change order of patch "scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()" to #1 as a preparation patch of whole series

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/3scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()drivers/scsi/ufs/ufs-sysfs.c drivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+10 -50 replies
2/3scsi: ufs: Do not overwrite Auto-Hibernate timerdrivers/scsi/ufs/ufshcd.c+1 -10 replies
3/3scsi: ufs: Add error-handling of Auto-Hibernatedrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshci.h+35 -20 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBean HuoAlim Akhtar
1/3R-b R-b
2/3R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] scsi: ufs: Add error handling of Auto-Hibernate

Currently auto-hibernate is activated if host supports auto-hibern8 capability. However error-handling is not implemented, which makes the feature somewhat risky.

If either "Hibernate Enter" or "Hibernate Exit" fail during auto-hibernate flow, the corresponding interrupt "UIC_HIBERNATE_ENTER" or "UIC_HIBERNATE_EXIT" shall be raised according to UFS specification.

This patch adds auto-hibernate error-handling:

- Monitor "Hibernate Enter" and "Hibernate Exit" interrupts after auto-hibernate feature is activated.

- If fail happens, trigger error-handling just like "manual-hibernate" fail and apply the same recovery flow: schedule UFS error handler in ufshcd_check_errors(), and then do host reset and restore in UFS error handler.

v5:
- Also re-factor checking of Auto-Hibernation support in other places, e.g., in ufshcd_auto_hibern8_enable() and in ufs-sysfs (Avri Altman)
- Change order of patch "scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()" to #1 as a preparation patch of whole series

v4:
- Replace original patch "[3/3] scsi: ufs: Use re-factored Auto-Hibernate function" by a new preparation patch "[2/3] scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()" for re-factoring ufshcd_is_auto_hibern8_supported (Avri Altman)
- Refine UIC mask definitions (Avri Altman)

v3:
- Fix typo in patch "scsi: ufs: Do not overwrite Auto-Hibernate timer" (Avri Altman)
- Rebase to Linux 5.2-rc1

v2:
- Fix sentences in commit message (Marc Gonzalez)
- Make "Auto-Hibernate" error detection more precise (Bean Huo)

Stanley Chu (3):
scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()
scsi: ufs: Do not overwrite Auto-Hibernate timer
scsi: ufs: Add error-handling of Auto-Hibernate

 drivers/scsi/ufs/ufs-sysfs.c |  6 +++---
 drivers/scsi/ufs/ufshcd.c    | 35 +++++++++++++++++++++++++++++++++--
 drivers/scsi/ufs/ufshcd.h    |  5 +++++
 drivers/scsi/ufs/ufshci.h    |  6 ++++--
 4 files changed, 45 insertions(+), 7 deletions(-)
Signature · 1 line
2.18.0