Skip to content

Commit

Permalink
Merge branch 'dipm-fix' into upstream-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Nov 5, 2007
2 parents 17bd9a2 + f5456b6 commit 152af05
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}

Expand Down

0 comments on commit 152af05

Please sign in to comment.