Commit ab6fc95f authored by Jeff Garzik's avatar Jeff Garzik

[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: default avatarJeff Garzik <jgarzik@redhat.com>
parent 360737a9
...@@ -898,8 +898,10 @@ static int ahci_reset_controller(struct ata_host *host) ...@@ -898,8 +898,10 @@ static int ahci_reset_controller(struct ata_host *host)
* AHCI-specific, such as HOST_RESET. * AHCI-specific, such as HOST_RESET.
*/ */
tmp = readl(mmio + HOST_CTL); tmp = readl(mmio + HOST_CTL);
if (!(tmp & HOST_AHCI_EN)) if (!(tmp & HOST_AHCI_EN)) {
writel(tmp | HOST_AHCI_EN, mmio + HOST_CTL); tmp |= HOST_AHCI_EN;
writel(tmp, mmio + HOST_CTL);
}
/* global controller reset */ /* global controller reset */
if ((tmp & HOST_RESET) == 0) { if ((tmp & HOST_RESET) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment