Author: mav
Date: Wed Feb  3 12:00:57 2010
New Revision: 203426
URL: http://svn.freebsd.org/changeset/base/203426

Log:
  Disable PHY of unconnected ports when interface power management enabled.
  It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M).

Modified:
  head/sys/dev/ahci/ahci.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c    Wed Feb  3 11:22:03 2010        (r203425)
+++ head/sys/dev/ahci/ahci.c    Wed Feb  3 12:00:57 2010        (r203426)
@@ -2297,7 +2297,12 @@ ahci_sata_phy_reset(device_t dev)
            ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 :
            (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)));
        DELAY(5000);
-       return (ahci_sata_connect(ch));
+       if (!ahci_sata_connect(ch)) {
+               if (ch->pm_level > 0)
+                       ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE);
+               return (0);
+       }
+       return (1);
 }
 
 static void
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to