Re: [PATCH v8 04/23] scsi: sd: Differentiate system and runtime start/stop management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/4/23 08:01, Phillip Susi wrote:
> Here is the patch.  The hang I saw before appears to be related to how
> I'm trying to force the runtime_pm status in
> ata_eh_revalidate_and_attach().  If I comment that part out, the hang
> goes away.  I'm not sure why I can't work out the right way to force the
> runtime pm status of the block device to agree with the actual status of
> the disk as known to libata during system resume.  Even with a disk not
> behind a PMP, while it does not cause a hang, it does not manage to get
> the runtime pm state to reflect reality.  It still says active even
> though the PuiS disk was left asleep.

That is because the PM operations are defined for the *port*, not the *device*
(struct ata_device). With the missing PM ops for the device, PM core simply
sets the device as active.

Also, the port PM runtime resume operation is synchronous with EH, that is, it
waits for EH to complete before returning. This wait is done with the device
lock held, so calling any PM function that takes the device lock within EH
context can deadlock... That is very likely what you are seeing.

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux