[PATCH 0/2] scsi: support spinup notification for SAS SSP devices in Active_Wait/Idle_Wait state
From: Xingui Yang
Date: Thu Jul 02 2026 - 00:17:52 EST
When a SAS HDD connected via SSP (Serial Attached SCSI Protocol) is powered
up with the RNOT (Ready Not Optimized) bit set, the device enters the
Active_Wait or Idle_Wait power state per the SAS protocol specification. In
this state, the device does not respond to standard SCSI START_STOP spinup
commands and instead returns NOT_READY with ASC/ASCQ = 0x04/0x11 ("Logical
unit not ready, notify (enable spinup) required").
Without handling this condition, the SCSI mid-layer will indefinitely retry
the command with ACTION_DELAYED_RETRY, resulting in the disk never spinning
up and becoming unusable. A typical manifestation is:
sd 4:0:9:0: [sde] Spinning up disk...
...not responding...
sd 4:0:9:0: [sde] Sense Key : Not Ready
sd 4:0:9:0: [sde] Add. Sense: Logical unit not ready, notify (enable spinup) required
To resolve this, the SAS controller needs to send a NOTIFY(ENABLE SPINUP)
primitive to the target phy, which transitions the device out of the waiting
state and allows normal spinup to proceed.
This patch series addresses the issue:
Adds a new optional spinup_notify callback to struct scsi_host_template
in the SCSI mid-layer. When ASC/ASCQ = 0x04/0x11 is detected in
scsi_io_completion_action(), the callback is invoked before the mid-layer
falls through to ACTION_DELAYED_RETRY, giving the LLDD an opportunity to
perform controller-specific spinup notification.
Xingui Yang (2):
scsi: scsi_lib: add spinup_notify callback for ASC/ASCQ=0x04/0x11
scsi: hisi_sas: add spinup_notify callback to handle
Active_Wait/Idle_Wait SSP devices
drivers/scsi/hisi_sas/hisi_sas.h | 1 +
drivers/scsi/hisi_sas/hisi_sas_main.c | 25 +++++++++++++++++++++++++
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 1 +
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 +
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 +
drivers/scsi/scsi_lib.c | 4 ++++
include/scsi/scsi_host.h | 9 +++++++++
7 files changed, 42 insertions(+)
--
2.43.0