scsi: sd: Add manage_restart device attribute to scsi_disk
authorMarkus Probst <markus.probst@posteo.de>
Tue, 4 Nov 2025 14:24:32 +0000 (14:24 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 8 Nov 2025 18:24:55 +0000 (13:24 -0500)
commit8fdfdb1488162c195f3f0af10b7bc2b8b42928c5
treef077e51e94532d160032e75a184623169967cbe8
parent3a8660878839faadb4f1a6dd72c3179c1df56787
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>
drivers/scsi/sd.c
include/scsi/scsi_device.h