From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 5 20:54:48 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85CD1106566C; Sat, 5 Feb 2011 20:54:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3C78FC08; Sat, 5 Feb 2011 20:54:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p15KsmtG040394; Sat, 5 Feb 2011 20:54:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15KsmVA040393; Sat, 5 Feb 2011 20:54:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201102052054.p15KsmVA040393@svn.freebsd.org> From: Alexander Motin Date: Sat, 5 Feb 2011 20:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218341 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 20:54:48 -0000 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);