From: vince@palmit.com.au
To: linux-scsi@vger.kernel.org
Cc: sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com,
suganath-prabu.subramani@broadcom.com, ranjan.kumar@broadcom.com,
James.Bottomley@HansenPartnership.com, mkp@kernel.org,
MPT-FusionLinux.pdl@broadcom.com, linux-kernel@vger.kernel.org
Subject: [PATCH] scsi: mpt3sas: Register devices during SANITIZE
Date: Wed, 21 Oct 2026 07:08:56 +1000 [thread overview]
Message-ID: <20261020210856.42835-1-vince@palmit.com.au> (raw)
A SAS disk being sanitized responds to TEST UNIT READY with NOT
READY, ASC 0x04, ASCQ 0x1b. mpt3sas discovery maps this sense to
DEVICE_START_UNIT and issues START UNIT repeatedly. The drive stays
NOT READY until the sanitize operation completes, causing discovery
to exhaust its retry budget and decline SCSI device registration.
Allow registration only for the SANITIZE IN PROGRESS sense, so sd/sg
can expose the target while retaining its actual NOT READY state.
All other sense dispositions are unchanged.
On an LSI SAS3008 with an HGST HUH728080AL4200, unpatched Linux
7.2.11 retried discovery 145 times without registering the device.
Linux 6.18.55 registered the same sanitizing drive. With the
equivalent 7.2.11 fix the disk registered as /dev/sda (0 B) and
/dev/sg0 while TEST UNIT READY still reported 02/04/1b and 47.32%
SANITIZE progress. Another SAS drive continued to enumerate.
This updated variant uses the named 0x041b sense constant introduced
in newer kernels. It passed static review on the current SCSI
for-next branch but has not been independently boot-tested there.
Fixes: aee682fad6cd ("scsi: mpt3sas: Improve device discovery and readiness handling for slow devices")
Assisted-by: LLM
Signed-off-by: Vincent YUE <vince@palmit.com.au>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 085d4672d..a77bbc3d2 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -7700,7 +7700,9 @@ _scsih_determine_disposition(struct MPT3SAS_ADAPTER *ioc,
u16 scode = scsi_sense_code(sense_info.asc,
sense_info.ascq);
- if (scode ==
+ if (scode == LU_NOT_READY_SANITIZE_IN_PROGRESS)
+ rc = DEVICE_READY;
+ else if (scode ==
LU_NOT_READY_MANUAL_INTERVENTION_REQUIRED ||
scode ==
LU_NOT_ACCESSIBLE_TARGET_PORT_IN_STANDBY_STATE ||
--
2.56.0
This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses. No warranty is made that this material is free from computer virus or any other defect or error. Any loss/damage incurred by using this material is not the sender's responsibility. The sender's entire liability will be limited to resupplying the material.
next reply other threads:[~2026-10-20 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 21:08 vince [this message]
2026-10-20 21:54 ` Laurence Oberman
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=20261020210856.42835-1-vince@palmit.com.au \
--to=vince@palmit.com.au \
--cc=James.Bottomley@HansenPartnership.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®