]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] libata: implement PM EH actions
authorTejun Heo <htejun@gmail.com>
Mon, 3 Jul 2006 07:07:26 +0000 (16:07 +0900)
committerJeff Garzik <jeff@garzik.org>
Thu, 6 Jul 2006 02:16:28 +0000 (22:16 -0400)
commit02670bf379267f55a43aa57f6895689697e90eb3
tree830b74690371e39cf8e94de678768993be743437
parentc0b6c0377c32fe3f6a2cf1e018db6da8a3b78379
[PATCH] libata: implement PM EH actions

Implement two PM per-dev EH actions - ATA_EH_SUSPEND and
ATA_EH_RESUME.  Each action puts the target device into suspended mode
and resumes from it respectively.

Once a device is put to suspended mode, no EH operations other than
RESUME is allowed on the device.  The device will stay suspended till
it gets resumed and thus reset and revalidated.  To implement this, a
new device state helper - ata_dev_ready() - is implemented and used in
EH action implementations to make them operate only on attached &
running devices.

If all possible devices on a port are suspended, reset is skipped too.
This prevents spurious events including hotplug events from disrupting
suspended devices.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/scsi/libata-core.c
drivers/scsi/libata-eh.c
include/linux/libata.h