ata: libata-core: Detach a port devices on shutdown
authorDamien Le Moal <dlemoal@kernel.org>
Mon, 28 Aug 2023 07:01:58 +0000 (16:01 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 3 Oct 2023 00:39:49 +0000 (09:39 +0900)
commit5b6fba546da246b3d0dd8465c07783e22629cc53
tree0bb25a059e71f1d0e0b4c9c99ff4f78dbcd3f947
parentcfead0dd81de95f52f416a676d4697484e093c8b
ata: libata-core: Detach a port devices on shutdown

Modify ata_pci_shutdown_one() to schedule EH to unload a port devices
before freezing and thawing the port. This ensures that drives are
cleanly disabled and transitioned to standby power mode when
a PCI adapter is removed or the system is powered off.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-core.c