linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Support power resources defined in acpi on ata
@ 2025-10-27 20:23 Markus Probst
  2025-10-27 20:23 ` [PATCH v5 1/3] scsi: sd: Add manage_restart device attribute to scsi_disk Markus Probst
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Markus Probst @ 2025-10-27 20:23 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel, James E.J. Bottomley,
	Martin K. Petersen
  Cc: linux-ide, linux-scsi, linux-kernel, Markus Probst

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

Changes since v4:
- improved documentation
- use false/true instead of 0/1
- removed repeating code in ata_acpi_dev_manage_restart
- split long lines
- removed debug message
- improved error message

Changes since v3:
- rename function from "ata_port_set_power_state"
  to "ata_acpi_port_power_on" and remove enable argument
- split "ata_acpi_port_power_on" and "ata_acpi_dev_manage_restart" into
  two commits
- improved commit messages
- improved comments (style and new comments)

Changes since v2:
- improved commit messages
- addressed warning from kernel test robot

Changes since v1:
- improved commit messages
- addressed style issues (too long lines and docs)
- removed ata_dev_manage_restart() and ata_port_set_power_state()
  methods
- improved log messages in ata_acpi_port_set_power_state


Markus Probst (3):
  scsi: sd: Add manage_restart device attribute to scsi_disk
  ata: stop disk on restart if ACPI power resources are found
  ata: Use ACPI methods to power on disks

 drivers/ata/libata-acpi.c  | 66 ++++++++++++++++++++++++++++++++++++++
 drivers/ata/libata-core.c  |  2 ++
 drivers/ata/libata-scsi.c  |  1 +
 drivers/ata/libata.h       |  4 +++
 drivers/scsi/sd.c          | 35 +++++++++++++++++++-
 include/scsi/scsi_device.h |  6 ++++
 6 files changed, 113 insertions(+), 1 deletion(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-28  4:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 20:23 [PATCH v5 0/3] Support power resources defined in acpi on ata Markus Probst
2025-10-27 20:23 ` [PATCH v5 1/3] scsi: sd: Add manage_restart device attribute to scsi_disk Markus Probst
2025-10-28  3:53   ` Damien Le Moal
2025-10-27 20:23 ` [PATCH v5 2/3] ata: stop disk on restart if ACPI power resources are found Markus Probst
2025-10-28  3:53   ` Damien Le Moal
2025-10-27 20:23 ` [PATCH v5 3/3] ata: Use ACPI methods to power on disks Markus Probst
2025-10-28  3:58   ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).