Skip to content

scsi: ufs: TM, fatal-error handling and other fixes

Sujit Reddy Thumma linux-arm-msm linux-scsi 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest posting 2/26 patches 0 repliesNew
  2. v7 posting 1/26 patches 8 repliesSuperseded

Changes in v7 from the cover letter

- Two new patches to fix static checker warnings
- remove usage of deprecated flush_work_sync() API.

Patches in v7 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6scsi: ufs: fix endianness sparse warningsdrivers/scsi/ufs/ufs.h drivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshci.h+42 -680 replies
2/6scsi: ufs: make undeclared functions staticdrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+4 -20 replies
3/6scsi: ufs: Fix broken task management command implementationdrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+122 -550 replies
4/6scsi: ufs: Fix hardware race conditions while aborting a commanddrivers/scsi/ufs/ufshcd.c+55 -150 replies
5/6scsi: ufs: Fix device and host reset methodsdrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+189 -530 replies
6/6scsi: ufs: Improve UFS fatal error handlingdrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+149 -900 replies

Reviews trailers per patch

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

PatchVinayak HolikattiYaniv GardiDolev Raviv
1/6A-b
2/6A-b
3/6A-b R-b T-b
4/6A-b R-b T-b
5/6A-b R-b T-b
6/6A-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [RESEND PATCH V7 0/6] scsi: ufs: TM, fatal-error handling and other fixes

This patch version fixes various static checker warnings along with fixing usage of deprecated flush_work_sync() API that led James drop the patchset from scsi-misc tree.

The first patch fixes many issues with current task management handling in UFSHCD driver. Others improve error handling in various scenarios.

These patches are rebased on scsi-misc and are ack'ed by UFS maintainer.

Changes from v6:
- Two new patches to fix static checker warnings
- remove usage of deprecated flush_work_sync() API.
Changes from v5:
- correct typo in [PATCH V5 1/4] scsi: ufs: Fix broken task ...
- correct poll wait in [PATCH V5 2/4] scsi: ufs: Fix hardware ...
- Included Tested-by and Reviewed-by ack's.
Changes from v4:
- Addressed comments from Seungwon Jeon on V3
- Updated with proper locking while ufshcd state changes
- Retained LUN reset instead of device reset with DME_END_POINT_RESET
- Removed error handling decisions dependent on OCS value
- Simplified fatal error handling to abort the requests first and then carry out reset.
Changes from v3:
- Rebased.
Changes from v2:
- [PATCH V3 1/4]: Make the task management command task tag unique across SCSI/NOP/QUERY request tags.
- [PATCH V3 3/4]: While handling device/host reset, wait for pending fatal handler to return if running.
Changes from v1:
- [PATCH V2 1/4]: Fix a race condition because of overloading outstanding_tasks variable to lock the slots. A new variable tm_slots_in_use will track which slots are in use by the driver.
- [PATCH V2 2/4]: Commit text update to clarify the hardware race with more details.
- [PATCH V2 3/4]: Minor cleanup and rebase
- [PATCH V2 4/4]: Fix a bug - sleeping in atomic context

Sujit Reddy Thumma (6):
scsi: ufs: fix endianness sparse warnings
scsi: ufs: make undeclared functions static
scsi: ufs: Fix broken task management command implementation
scsi: ufs: Fix hardware race conditions while aborting a command
scsi: ufs: Fix device and host reset methods
scsi: ufs: Improve UFS fatal error handling

 drivers/scsi/ufs/ufs.h    |  36 +--
 drivers/scsi/ufs/ufshcd.c | 722 +++++++++++++++++++++++++++++++---------------
 drivers/scsi/ufs/ufshcd.h |  22 +-
 drivers/scsi/ufs/ufshci.h |  32 +-
 4 files changed, 545 insertions(+), 267 deletions(-)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.