aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-29 10:43:55 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-29 10:43:55 -0400
commitab6fc95f609b372a19e18ea689986846ab1ba29c (patch)
tree596c0139d5054bfe31b3c3ee36bcc8e6c50e8f9f
parent360737a982b1ae09e1659e0bb27085c03f02f404 (diff)
[libata] AHCI: fix newly introduced host-reset bug
The recent fix to host reset introduced a problem, whereby AHCI-enable bit would be cleared upon reset, if it was not asserted prior to reset. Unconditionally enable AHCI-enable bit. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/ata/ahci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 93bcb2cb3d35..c8ab947cf359 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -898,8 +898,10 @@ static int ahci_reset_controller(struct ata_host *host)
898 * AHCI-specific, such as HOST_RESET. 898 * AHCI-specific, such as HOST_RESET.
899 */ 899 */
900 tmp = readl(mmio + HOST_CTL); 900 tmp = readl(mmio + HOST_CTL);
901 if (!(tmp & HOST_AHCI_EN)) 901 if (!(tmp & HOST_AHCI_EN)) {
902 writel(tmp | HOST_AHCI_EN, mmio + HOST_CTL); 902 tmp |= HOST_AHCI_EN;
903 writel(tmp, mmio + HOST_CTL);
904 }
903 905
904 /* global controller reset */ 906 /* global controller reset */
905 if ((tmp & HOST_RESET) == 0) { 907 if ((tmp & HOST_RESET) == 0) {