mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>,
	jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: dlemoal@kernel.org, bblock@linux.ibm.com,
	acelan.kao@canonical.com, linux-pm@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] scsi: core: Wait until device is fully resumed before doing rescan
Date: Thu, 1 Jun 2023 12:48:43 -0700	[thread overview]
Message-ID: <164576ab-4e68-ca5d-0c9e-d756588cdbb5@acm.org> (raw)
In-Reply-To: <20230601155652.1157611-1-kai.heng.feng@canonical.com>

On 6/1/23 08:56, Kai-Heng Feng wrote:
> During system resuming process, the resuming order is from top to down.
> Namely, the ATA host is resumed before disks connected to it.
> 
> When an EH is scheduled while ATA host is resumed and disk device is
> still suspended, the device_lock hold by scsi_rescan_device() is never
> released so the dpm_resume() of the disk is blocked forerver, therefore
> the system can never be resumed back.
> 
> That's because scsi_attach_vpd() is expecting the disk device is in
> operational state, as it doesn't work on suspended device.
> 
> To avoid such deadlock, wait until the scsi device is fully resumed,
> before continuing the rescan process.

Why doesn't scsi_attach_vpd() support runtime power management? Calling 
scsi_attach_vpd() should result in a call of sdev_runtime_resume(), 
isn't it?

Thanks,

Bart.


  reply	other threads:[~2023-06-01 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 15:56 Kai-Heng Feng
2023-06-01 19:48 ` Bart Van Assche [this message]
2023-06-02  1:00   ` Kai-Heng Feng
2023-06-02  4:25 ` kernel test robot

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=164576ab-4e68-ca5d-0c9e-d756588cdbb5@acm.org \
    --to=bvanassche@acm.org \
    --cc=acelan.kao@canonical.com \
    --cc=bblock@linux.ibm.com \
    --cc=dlemoal@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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®