From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Alexey Charkov <alchark@flipper.net>,
Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH 0/5] Recover from persistent UNIT ATTENTION conditions
Date: Fri, 30 Oct 2026 15:42:34 -0700 [thread overview]
Message-ID: <cover.1793400000.git.bvanassche@acm.org> (raw)
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(-)
next reply other threads:[~2026-10-30 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 22:42 Bart Van Assche [this message]
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
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=cover.1793400000.git.bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=alchark@flipper.net \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 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.