svn commit: r215453 - head/sys/dev/ata
Alexander Motin
mav at FreeBSD.org
Thu Nov 18 11:58:17 UTC 2010
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) {
More information about the svn-src-head
mailing list