Re: [PATCH v5 2/3] ata: stop disk on restart if ACPI power resources are found
From: Damien Le Moal
Date: Mon Oct 27 2025 - 23:57:18 EST
On 10/28/25 5:23 AM, Markus Probst wrote:
> Some embedded devices have the ability to control whether power is
> provided to the disks via the SATA power connector or not. ACPI power
> resources are usually off by default, thus making it unclear if the
> specific power resource will retain its state after a restart. If power
> resources are defined on ATA ports / devices in ACPI, we should stop the
> disk on SYSTEM_RESTART, to ensure the disk will not lose power while
> active.
>
> Add a new function, ata_acpi_dev_manage_restart(), that will be used to
> determine if a disk should be stopped before restarting the system. If a
> usable ACPI power resource has been found, it is assumed that the disk
> will lose power after a restart and should be stopped to avoid a power
> failure.
I think you meant to say "to avoid unclean shutdown due to power loss." ?
Because this is not handling a power failure, but rather a power loss on
shutdown with the device still running, right ?
With that clarified, looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
--
Damien Le Moal
Western Digital Research