Re: [PATCH v4] scsi: libsas: Fix SMP IO deadlock during HA resume

From: Martin K. Petersen (Oracle)

Date: Wed Oct 14 2026 - 23:04:01 EST


On Mon, 28 Sep 2026 12:02:34 +0800, Xingui Yang wrote:

> smp_execute_task_sg() calls pm_runtime_get_sync() on the host before
> issuing an SMP command. When that command is itself issued from the
> HA resume path, the get_sync() deadlocks: it waits for the ongoing
> resume (the device is RPM_RESUMING), while the resume is blocked in
> sas_drain_work() waiting for that same SMP IO to complete.
>
> The deadlock needs an expander-attached SATA disk. During
> sas_resume_ha() -> sas_drain_work(), DISCE_RESUME ->
> sas_resume_sata() -> ata_sas_port_resume() requests ATA_EH_RESET,
> and the hard reset for such a disk is done via SMP PHY CONTROL
> (sas_ata_hard_reset() -> sas_phy_reset() -> sas_smp_phy_control() ->
> smp_execute_task_sg()). Direct-attached SATA resets through
> lldd_control_phy() and SSP devices use TMFs, so neither hits this.
>
> [...]

Applied to 7.3/scsi-fixes, thanks!

[1/1] scsi: libsas: Fix SMP IO deadlock during HA resume
https://git.kernel.org/mkp/scsi/c/81e097a064b2

--
Martin K. Petersen