summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-01 01:38:18 +0900
committerJeff Garzik <jeff@garzik.org>2006-04-01 14:52:08 -0500
commit852ee16a914fb3ada2f81e222677c04defc2f15f (patch)
tree8635f8a309a023e0991e30a6a3583aafd91b99f5 /drivers
parente82cbdb9a3791f781462c9d00e3486e8fb7e58a8 (diff)
[PATCH] libata: preserve SATA SPD setting over hard resets
Don't overwrite SPD setting during hard reset. This change has the (intended) side effect of honoring the BIOS configuration. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 061b0b6544cc..3acf56200d87 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2132,9 +2132,11 @@ err_out:
static int sata_phy_resume(struct ata_port *ap)
{
unsigned long timeout = jiffies + (HZ * 5);
- u32 sstatus;
+ u32 scontrol, sstatus;
- scr_write_flush(ap, SCR_CONTROL, 0x300);
+ scontrol = scr_read(ap, SCR_CONTROL);
+ scontrol = (scontrol & 0x0f0) | 0x300;
+ scr_write_flush(ap, SCR_CONTROL, scontrol);
/* Wait for phy to become ready, if necessary. */
do {
@@ -2247,10 +2249,14 @@ int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes)
*/
int sata_std_hardreset(struct ata_port *ap, int verbose, unsigned int *class)
{
+ u32 scontrol;
+
DPRINTK("ENTER\n");
/* Issue phy wake/reset */
- scr_write_flush(ap, SCR_CONTROL, 0x301);
+ scontrol = scr_read(ap, SCR_CONTROL);
+ scontrol = (scontrol & 0x0f0) | 0x301;
+ scr_write_flush(ap, SCR_CONTROL, scontrol);
/*
* Couldn't find anything in SATA I/II specs, but AHCI-1.1