diff options
author | mav <mav@FreeBSD.org> | 2010-11-18 11:58:17 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-11-18 11:58:17 +0000 |
commit | a8ae41654e90e1648c5d511772215be2cbdac099 (patch) | |
tree | 3ae2c520160c32a4e660d31859b0412986f96e6c /sys/dev/ata | |
parent | 6bb48656446613cedfecd52118dcd7071e300791 (diff) | |
download | FreeBSD-src-a8ae41654e90e1648c5d511772215be2cbdac099.zip FreeBSD-src-a8ae41654e90e1648c5d511772215be2cbdac099.tar.gz |
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.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-sata.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-sata.c b/sys/dev/ata/ata-sata.c index d3df7ce..e95fc8f 100644 --- a/sys/dev/ata/ata-sata.c +++ b/sys/dev/ata/ata-sata.c @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int port, int quick) 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) { |