From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 11:58:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581FB106564A; Thu, 18 Nov 2010 11:58:17 +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 4790D8FC08; Thu, 18 Nov 2010 11:58:17 +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 oAIBwHCP029527; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIBwHpA029525; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181158.oAIBwHpA029525@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 11:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215453 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 11:58:17 -0000 Author: mav Date: Thu Nov 18 11:58:17 2010 New Revision: 215453 URL: http://svn.freebsd.org/changeset/base/215453 Log: Even if we are skipping SATA hard reset - set power management bits in SControl register. This should make things consistent and help to avoid unexpected PHY events that I've noticed in some cases on VIA controllers. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Thu Nov 18 11:19:23 2010 (r215452) +++ head/sys/dev/ata/ata-sata.c Thu Nov 18 11:58:17 2010 (r215453) @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int por if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) return (0); - if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) + if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) { + ata_sata_scr_write(ch, port, ATA_SCONTROL, + ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)); return ata_sata_connect(ch, port, quick); + } } if (bootverbose) {