summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo2010-09-07 14:05:31 +0200
committerJeff Garzik2010-09-10 04:27:59 +0200
commite2f3d75fc0e4a0d03c61872bad39ffa2e74a04ff (patch)
treeb98d70dadfe9143453494bd145a53c06910df4f7 /drivers/ata/libata-eh.c
parentahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs (diff)
downloadkernel-qcow2-linux-e2f3d75fc0e4a0d03c61872bad39ffa2e74a04ff.tar.gz
kernel-qcow2-linux-e2f3d75fc0e4a0d03c61872bad39ffa2e74a04ff.tar.xz
kernel-qcow2-linux-e2f3d75fc0e4a0d03c61872bad39ffa2e74a04ff.zip
libata: skip EH autopsy and recovery during suspend
For some mysterious reason, certain hardware reacts badly to usual EH actions while the system is going for suspend. As the devices won't be needed until the system is resumed, ask EH to skip usual autopsy and recovery and proceed directly to suspend. Signed-off-by: Tejun Heo <tj@kernel.org> Tested-by: Stephan Diestelhorst <stephan.diestelhorst@amd.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c9ae299b8342..e48302eae55f 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3235,6 +3235,10 @@ static int ata_eh_skip_recovery(struct ata_link *link)
if (link->flags & ATA_LFLAG_DISABLED)
return 1;
+ /* skip if explicitly requested */
+ if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
+ return 1;
+
/* thaw frozen port and recover failed devices */
if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link))
return 0;