summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Probst <markus.probst@posteo.de>2025-11-04 14:24:32 +0000
committerMartin K. Petersen <martin.petersen@oracle.com>2025-11-08 13:24:55 -0500
commit8fdfdb1488162c195f3f0af10b7bc2b8b42928c5 (patch)
treef077e51e94532d160032e75a184623169967cbe8 /include
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
scsi: sd: Add manage_restart device attribute to scsi_disk
In addition to the already existing manage_shutdown, manage_system_start_stop and manage_runtime_start_stop device scsi_disk attributes, add manage_restart, which allows the high-level device driver (sd) to manage the device power state for SYSTEM_RESTART if set to 1. This attribute is necessary for the following commit "ata: stop disk on restart if ACPI power resources are found" to avoid a potential disk power failure in the case the SATA power connector does not retain the power state after a restart. Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Markus Probst <markus.probst@posteo.de> Link: https://patch.msgid.link/20251104142413.322347-2-markus.probst@posteo.de Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 6d6500148c4b..c7e657ac8b6d 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -179,6 +179,12 @@ struct scsi_device {
unsigned manage_shutdown:1;
/*
+ * If true, let the high-level device driver (sd) manage the device
+ * power state for system restart (reboot) operations.
+ */
+ unsigned manage_restart:1;
+
+ /*
* If set and if the device is runtime suspended, ask the high-level
* device driver (sd) to force a runtime resume of the device.
*/