Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Feb 2011 20:54:48 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r218341 - stable/8/sys/cam/ata
Message-ID:  <201102052054.p15KsmVA040393@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Feb  5 20:54:47 2011
New Revision: 218341
URL: http://svn.freebsd.org/changeset/base/218341

Log:
  MFC r217874:
  Make device initialization sequence shorter when possible. Do not enable/
  disable already enabled/disabled SATA features.

Modified:
  stable/8/sys/cam/ata/ata_xpt.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)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Sat Feb  5 20:52:43 2011	(r218340)
+++ stable/8/sys/cam/ata/ata_xpt.c	Sat Feb  5 20:54:47 2011	(r218341)
@@ -988,7 +988,9 @@ noerror:
 		cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS;
 		xpt_action((union ccb *)&cts);
 		softc->caps = caps;
-		if (ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) {
+		if ((ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) &&
+		    (!(softc->caps & CTS_SATA_CAPS_H_PMREQ)) !=
+		    (!(ident_buf->sataenabled & ATA_SUPPORT_IFPWRMNGT))) {
 			PROBE_SET_ACTION(softc, PROBE_SETPM);
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);
@@ -997,7 +999,9 @@ noerror:
 		/* FALLTHROUGH */
 	case PROBE_SETPM:
 		if (ident_buf->satacapabilities != 0xffff &&
-		    ident_buf->satacapabilities & ATA_SUPPORT_DAPST) {
+		    (ident_buf->satacapabilities & ATA_SUPPORT_DAPST) &&
+		    (!(softc->caps & CTS_SATA_CAPS_H_APST)) !=
+		    (!(ident_buf->sataenabled & ATA_ENABLED_DAPST))) {
 			PROBE_SET_ACTION(softc, PROBE_SETAPST);
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);
@@ -1005,7 +1009,9 @@ noerror:
 		}
 		/* FALLTHROUGH */
 	case PROBE_SETAPST:
-		if (ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) {
+		if ((ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) &&
+		    (!(softc->caps & CTS_SATA_CAPS_H_DMAAA)) !=
+		    (!(ident_buf->sataenabled & ATA_SUPPORT_AUTOACTIVATE))) {
 			PROBE_SET_ACTION(softc, PROBE_SETDMAAA);
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102052054.p15KsmVA040393>