Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: yangxingui <yangxingui@huawei.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v3] scsi: libsas: Fix SMP IO deadlock during HA resume
Date: Sun, 20 Sep 2026 14:27:33 +0800	[thread overview]
Message-ID: <3befeeba-f395-c136-5dcf-4297db9751af@huawei.com> (raw)
In-Reply-To: <20260918071518.BD35B1F000FF@smtp.kernel.org>



On 2026/9/18 15:15, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] scsi: libsas: concurrent SMP IO to uninitialized hardware during PM resume

No SMP command can reach the hardware before it is initialised. During
suspend, sas_suspend_devices() -> sas_notify_lldd_dev_gone() marks
every device gone (hisi_sas_dev_gone() sets SAS_PHY_UNUSED, or NULLs
lldd_dev for non-PM removal), and lldd rejects such commands via 
DEV_IS_GONE() with -ECOMM before any hardware access.
Devices are only re-registered by sas_resume_port() ->
sas_notify_lldd_dev_found(), which runs from the PHY UP events - i.e.
after hw_init_v3_hw() and phys_init_v3_hw() have completed.

log as follow:
[48370.881905] hisi_sas_v3_hw 0000:74:04.0: resuming from operating 
state [D0]
[48371.864031] jamy pm_runtime_get_noresume(ha->dev)
[48371.869751] hisi_sas_v3_hw 0000:74:04.0: task prep: device 19 not ready
[48371.877442] hisi_sas_v3_hw 0000:74:04.0: task exec: failed[-70]!
[48371.884342] sas: executing SMP task failed:-70
[48371.889667] jamy pm_runtime_put(ha->dev)
[48371.903331] jamy pm_runtime_get_noresume(ha->dev)
[48371.908931] hisi_sas_v3_hw 0000:74:04.0: task prep: device 19 not ready
[48371.916628] hisi_sas_v3_hw 0000:74:04.0: task exec: failed[-70]!
[48371.923535] sas: executing SMP task failed:-70
[48371.928877] jamy pm_runtime_put(ha->dev)
[48372.117963] hisi_sas_v3_hw 0000:74:04.0: neither _PS0 nor _PR0 is defined
[48372.126124] hisi_sas_v3_hw 0000:74:04.0: waiting up to 25 seconds for 
4 phys to resume
[48372.180880] hisi_sas_v3_hw 0000:74:04.0: phyup: phy0 link_rate=11
[48372.187994] hisi_sas_v3_hw 0000:74:04.0: phyup: phy1 link_rate=11
[48372.188003] hisi_sas_v3_hw 0000:74:04.0: dev[22:2] found
[48372.195016] hisi_sas_v3_hw 0000:74:04.0: phyup: phy2 link_rate=11
[48372.195019] hisi_sas_v3_hw 0000:74:04.0: phyup: phy3 link_rate=11
[48372.201352] hisi_sas_v3_hw 0000:74:04.0: dev[23:1] found
[48372.221700] hisi_sas_v3_hw 0000:74:04.0: dev[24:1] found
[48372.228037] hisi_sas_v3_hw 0000:74:04.0: end of resuming controller

Thanks,
Xingui

  reply	other threads:[~2026-09-20  6:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  7:03 [PATCH v3] scsi: libsas: Fix SMP IO deadlock during HA resume Xingui Yang
2026-09-18  7:15 ` sashiko-bot
2026-09-20  6:27   ` yangxingui [this message]
2026-09-21 11:37 ` John Garry
2026-09-21 12:21   ` yangxingui
2026-09-21 14:05     ` John Garry
2026-09-22  3:10       ` yangxingui
2026-09-22 10:37         ` John Garry
2026-09-28  3:47           ` yangxingui

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=3befeeba-f395-c136-5dcf-4297db9751af@huawei.com \
    --to=yangxingui@huawei.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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