All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Recover from persistent UNIT ATTENTION conditions
@ 2026-10-30 22:42 Bart Van Assche
  2026-10-30 22:42 ` [PATCH 1/5] scsi: core: Introduce scsi_cmd_needs_stu() Bart Van Assche
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-10-30 22:42 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: linux-scsi, Alexey Charkov, Bart Van Assche

Hi Martin,

Some SCSI targets do not clear a power-on or reset UNIT ATTENTION
condition for all commands. BIWIN BWU2A05* UFS devices, for example,
keep reporting UNIT ATTENTION for WRITE commands while TEST UNIT READY,
READ and SYNCHRONIZE CACHE clear the condition. Today such WRITE
commands are retried until the command runtime limit is exceeded. A
quirk has been proposed for these devices [1]. This patch series instead
makes the SCSI core recover from persistent UNIT ATTENTION conditions,
so that no per-device quirk list has to be maintained:
- Patches 1 and 2 prepare the SCSI error handler for the changes in
  the later patches.
- Patch 3 makes the SCSI error handler send TEST UNIT READY to clear
  UNIT ATTENTION conditions before it falls back to resetting the
  device.
- Patch 4 makes scsi_decide_disposition() invoke the error handler if
  a command receives the same UNIT ATTENTION repeatedly. The behavior
  of the exported scsi_check_sense() function, used by libata, is not
  changed.
- Patch 5 limits the number of retries in scsi_io_completion_action()
  of commands that keep receiving UNIT ATTENTION.

Please consider this patch series for the next merge window.

[1] https://lore.kernel.org/linux-scsi/20261028-biwin-tua-quirk-v1-1-767a12c9b9cc@flipper.net/

Thanks,

Bart.

Bart Van Assche (5):
  scsi: core: Introduce scsi_cmd_needs_stu()
  scsi: core: Simplify scsi_eh_ready_devs()
  scsi: core: Clear UNIT ATTENTION conditions with TEST UNIT READY
  scsi: core: Escalate persistent UNIT ATTENTION conditions
  scsi: core: Limit retries of commands that receive UNIT ATTENTION

 drivers/scsi/scsi_error.c | 255 +++++++++++++++++++++++++++++++++++---
 drivers/scsi/scsi_lib.c   |   5 +
 include/scsi/scsi_cmnd.h  |   7 ++
 3 files changed, 249 insertions(+), 18 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-30 22:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 22:42 [PATCH 0/5] Recover from persistent UNIT ATTENTION conditions Bart Van Assche
2026-10-30 22:42 ` [PATCH 1/5] scsi: core: Introduce scsi_cmd_needs_stu() Bart Van Assche
2026-10-30 22:42 ` [PATCH 2/5] scsi: core: Simplify scsi_eh_ready_devs() Bart Van Assche
2026-10-30 22:42 ` [PATCH 3/5] scsi: core: Clear UNIT ATTENTION conditions with TEST UNIT READY Bart Van Assche
2026-10-30 22:42 ` [PATCH 4/5] scsi: core: Escalate persistent UNIT ATTENTION conditions Bart Van Assche
2026-10-30 22:42 ` [PATCH 5/5] scsi: core: Limit retries of commands that receive UNIT ATTENTION Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.