]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
libata: Don't disable dipm with SET FEATURES
authorKristen Carlson Accardi <kristen.c.accardi@intel.com>
Fri, 2 Nov 2007 23:37:08 +0000 (16:37 -0700)
committerJeff Garzik <jeff@garzik.org>
Mon, 5 Nov 2007 03:54:21 +0000 (22:54 -0500)
LPM seems to get hung up while disabling DIPM, and after thinking
about this a bit, I don't think we really need to manually disable it
anyway.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index 164c7d9514f9f0ce32088d1681a090c4c630875c..3ed3cf2f5568ce43dbac5388097dd6c550a9392b 100644 (file)
@@ -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;
        }