aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-11-05 09:16:38 -0500
committerJeff Garzik <jeff@garzik.org>2007-11-05 09:16:38 -0500
commit152af05cc85119d294b977ab4de07a781795c298 (patch)
treecfbe22a936095883b71d313dbaee26db5a0f5b71
parent17bd9a2f4c35de29d2539a2ff6851d61be281e25 (diff)
parentf5456b63ec9fdad37b680fc9fe6fe8222d2c1839 (diff)
Merge branch 'dipm-fix' into upstream-fixes
-rw-r--r--drivers/ata/libata-core.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 164c7d9514f..3ed3cf2f556 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -676,10 +676,11 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy)
if (rc)
return rc;
- /* disable DIPM */
- if (ata_dev_enabled(dev) && (dev->flags & ATA_DFLAG_DIPM))
- err_mask = ata_dev_set_feature(dev,
- SETFEATURES_SATA_DISABLE, SATA_DIPM);
+ /*
+ * we don't have to disable DIPM since IPM flags
+ * disallow transitions to SLUMBER, which effectively
+ * disable DIPM if it does not support PARTIAL
+ */
break;
case NOT_AVAILABLE:
case MAX_PERFORMANCE:
@@ -689,10 +690,11 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy)
if (rc)
return rc;
- /* disable DIPM */
- if (ata_dev_enabled(dev) && (dev->flags & ATA_DFLAG_DIPM))
- err_mask = ata_dev_set_feature(dev,
- SETFEATURES_SATA_DISABLE, SATA_DIPM);
+ /*
+ * we don't have to disable DIPM since IPM flags
+ * disallow all transitions which effectively
+ * disable DIPM anyway.
+ */
break;
}