aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-18 13:16:30 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-18 13:16:30 +1100
commitc71327ad9f925a4ddbf24db80ce66165104c4ed0 (patch)
treea1560ddfb827d580843d2a32ba19fb0fc85490d8 /drivers/ata/libata-sff.c
parentf507cd22035fdadd5dbb476dd05e9e7ee21c3b84 (diff)
parenta4bd6a93c3f14691c8a29e53eb04dc734b27f0db (diff)
Merge commit 'gcl/merge' into merge
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 714cb046b59..f93dc029dfd 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2066,6 +2066,7 @@ static int ata_bus_softreset(struct ata_port *ap, unsigned int devmask,
iowrite8(ap->ctl | ATA_SRST, ioaddr->ctl_addr);
udelay(20); /* FIXME: flush */
iowrite8(ap->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = ap->ctl;
/* wait the port to become ready */
return ata_sff_wait_after_reset(&ap->link, devmask, deadline);
@@ -2190,8 +2191,10 @@ void ata_sff_postreset(struct ata_link *link, unsigned int *classes)
}
/* set up device control */
- if (ap->ioaddr.ctl_addr)
+ if (ap->ioaddr.ctl_addr) {
iowrite8(ap->ctl, ap->ioaddr.ctl_addr);
+ ap->last_ctl = ap->ctl;
+ }
}
EXPORT_SYMBOL_GPL(ata_sff_postreset);
@@ -2534,6 +2537,7 @@ void ata_bus_reset(struct ata_port *ap)
if (ap->flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST)) {
/* set up device control for ATA_FLAG_SATA_RESET */
iowrite8(ap->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = ap->ctl;
}
DPRINTK("EXIT\n");