svn commit: r203904 - stable/8/sys/dev/ahci

Alexander Motin mav at FreeBSD.org
Sun Feb 14 20:00:21 UTC 2010


Author: mav
Date: Sun Feb 14 20:00:21 2010
New Revision: 203904
URL: http://svn.freebsd.org/changeset/base/203904

Log:
  MFC r203426:
  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:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Sun Feb 14 19:59:19 2010	(r203903)
+++ stable/8/sys/dev/ahci/ahci.c	Sun Feb 14 20:00:21 2010	(r203904)
@@ -2291,7 +2291,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


More information about the svn-src-stable mailing list