diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-29 15:43:55 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-29 15:43:55 +0100 |
commit | ab6fc95f609b372a19e18ea689986846ab1ba29c (patch) | |
tree | 596c0139d5054bfe31b3c3ee36bcc8e6c50e8f9f /drivers/ata/ahci.c | |
parent | [libata] sata_nv: fix SWNCQ enabling (diff) | |
download | linux-ab6fc95f609b372a19e18ea689986846ab1ba29c.tar.xz linux-ab6fc95f609b372a19e18ea689986846ab1ba29c.zip |
[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>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 6 |
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) * AHCI-specific, such as HOST_RESET. */ tmp = readl(mmio + HOST_CTL); - if (!(tmp & HOST_AHCI_EN)) - writel(tmp | HOST_AHCI_EN, mmio + HOST_CTL); + if (!(tmp & HOST_AHCI_EN)) { + tmp |= HOST_AHCI_EN; + writel(tmp, mmio + HOST_CTL); + } /* global controller reset */ if ((tmp & HOST_RESET) == 0) { |