From: Damien Le Moal <dlemoal@kernel.org>
To: linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
MPT-FusionLinux.pdl@broadcom.com
Cc: Friedrich Weber <f.weber@proxmox.com>
Subject: [PATCH 2/2] scsi: mpt3sas: Disable Command Duration Limit Probing
Date: Wed, 23 Jul 2025 14:23:34 +0900 [thread overview]
Message-ID: <20250723052334.32298-3-dlemoal@kernel.org> (raw)
In-Reply-To: <20250723052334.32298-1-dlemoal@kernel.org>
All SAS HBA models controlled by the mpt2sas and mp3sas drivers do not
support the Command Duration Limits (CDL) feature of ATA devices in
their SCSI-to-ATA translation layer (SAT) firmware. Probing ATA devices
for CDL support with scsi_cdl_check() will thus always result in CDL
being reported as not supported.
However, users in the field have reported that some of these HBA models
react badly to this probe and cause scan command errors when
scsi_cdl_check() is called, especially for device probe resulting from
a device hotplug. An example of such problem is shown below:
kernel: mpt3sas_cm0: handle(0xa) sas_address(0xREDACTED_SAS_ADDR) port_type(0x1)
kernel: scsi 5:0:1:0: Direct-Access WDC REDACTED_SN C5C0 PQ: 0 ANSI: 7
kernel: scsi 5:0:1:0: SSP: handle(0x000a), sas_addr(0xREDACTED_SAS_ADDR), phy(2), device_name(REDACTED_DEVICE_NAME)
kernel: scsi 5:0:1:0: enclosure logical id (REDACTED_LOGICAL_ID), slot(0)
kernel: scsi 5:0:1:0: enclosure level(0x0000), connector name( )
kernel: scsi 5:0:1:0: qdepth(254), tagged(1), scsi_level(8), cmd_que(1)
kernel: scsi 5:0:1:0: Power-on or device reset occurred
kernel: mpt3sas_cm0: log_info(0x31110e05): originator(PL), code(0x11), sub_code(0x0e05)
kernel: mpt3sas_cm0: log_info(0x31130000): originator(PL), code(0x13), sub_code(0x0000)
kernel: sd 5:0:1:0: Attached scsi generic sg1 type 0
kernel: sd 5:0:1:0: [sdb] Test Unit Ready failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
kernel: sd 5:0:1:0: [sdb] Read Capacity(16) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
kernel: sd 5:0:1:0: [sdb] Sense not available.
kernel: sd 5:0:1:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
kernel: sd 5:0:1:0: [sdb] Sense not available.
kernel: sd 5:0:1:0: [sdb] 0 512-byte logical blocks: (0 B/0 B)
kernel: sd 5:0:1:0: [sdb] 0-byte physical blocks
kernel: sd 5:0:1:0: [sdb] Test WP failed, assume Write Enabled
kernel: sd 5:0:1:0: [sdb] Asking for cache data failed
kernel: sd 5:0:1:0: [sdb] Assuming drive cache: write through
kernel: end_device-5:1: add: handle(0x000a), sas_addr(0xREDACTED_SAS_ADDR)
kernel: mpt3sas_cm0: handle(0x000a), ioc_status(0x0022) failure at drivers/scsi/mpt3sas/mpt3sas_transport.c:225/_transport_set_identify()!
kernel: sd 5:0:1:0: [sdb] Attached SCSI disk
kernel: mpt3sas_cm0: mpt3sas_transport_port_remove: removed: sas_addr(0xREDACTED_SAS_ADDR)
kernel: mpt3sas_cm0: removing handle(0x000a), sas_addr(0xREDACTED_SAS_ADDR)
kernel: mpt3sas_cm0: enclosure logical id(REDACTED_LOGICAL_ID), slot(0)
kernel: mpt3sas_cm0: enclosure level(0x0000), connector name( )
This issue sometimes even requires a full host power cycle to recover
and get a successful device scan.
This issue is likely limited to older models that are now EOL and since
no HBA firmware update will fix this issue, work around it by
force-disabling CDL probing on ATA devices by setting the no_ata_cdl
SCSI host template flag. This does not affect well-behaved HBA models
since as mentioned above, these HBAs do not support ATA CDL anyway. This
change also does not affect probing of CDL support on SAS devices.
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Fixes: 624885209f31 ("scsi: core: Detect support for command duration limits")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index d7d8244dfedc..32c3ab18cfbc 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -11943,6 +11943,7 @@ static const struct scsi_host_template mpt2sas_driver_template = {
.shost_groups = mpt3sas_host_groups,
.sdev_groups = mpt3sas_dev_groups,
.track_queue_depth = 1,
+ .no_ata_cdl = 1,
.cmd_size = sizeof(struct scsiio_tracker),
};
@@ -11982,6 +11983,7 @@ static const struct scsi_host_template mpt3sas_driver_template = {
.shost_groups = mpt3sas_host_groups,
.sdev_groups = mpt3sas_dev_groups,
.track_queue_depth = 1,
+ .no_ata_cdl = 1,
.cmd_size = sizeof(struct scsiio_tracker),
.map_queues = scsih_map_queues,
.mq_poll = mpt3sas_blk_mq_poll,
--
2.50.1
next prev parent reply other threads:[~2025-07-23 5:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 5:23 [PATCH 0/2] Disable CDL probing on ATA with mpt2sas and mpt3sas Damien Le Moal
2025-07-23 5:23 ` [PATCH 1/2] scsi: Allow SCSI hosts to force-disable CDL support probing Damien Le Moal
2025-07-23 5:23 ` Damien Le Moal [this message]
2025-07-24 12:01 ` [PATCH 0/2] Disable CDL probing on ATA with mpt2sas and mpt3sas Friedrich Weber
2025-07-24 13:10 ` Damien Le Moal
2025-07-30 10:44 ` Friedrich Weber
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=20250723052334.32298-3-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=f.weber@proxmox.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 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.