[PATCH 0/2] Support power resources in ata ports

From: Markus Probst
Date: Sun Oct 05 2025 - 15:05:37 EST


This series adds support for power resources defined in acpi for ata
ports. A device can define a power resource in an ata port, which then
gets turned on right before the port is probed. This can be useful for
devices, which have ata ports that are:
a: powered down by default
b: can be individually powered on
like in every synology nas device that supports a feature they call
"deep-sleep". If thats the case it will be assumed, that the power
resource won't survive reboots and therefore the disk will be stopped.

I will maybe extend it later to allow
- setting a delay between the probes (embedded devices have limited
power and if the disks are all spin up at the same time it would cause
a power peak)
- powering down the ata ports (removing power from the disks) while
the disk is spin down (saving power and possibly disk lifetime)


For details, look at the individual commit messages.

Markus Probst (2):
Add manage_restart device attribute to scsi_disk
Power on ata ports defined in ACPI before probing ports

drivers/ata/libata-acpi.c | 68
++++++++++++++++++++++++++++++++++++++++++++++
drivers/ata/libata-core.c | 21 ++++++++++++++
drivers/ata/libata-scsi.c | 1 +
drivers/ata/libata.h | 4 +++
drivers/scsi/sd.c | 35 +++++++++++++++++++++++-
include/linux/libata.h | 1 +
include/scsi/scsi_device.h | 6 ++++
7 files changed, 135 insertions(+), 1 deletion(-)