Skip to content

Commit

Permalink
[libata] AHCI: fix newly introduced host-reset bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Garzik committed Oct 29, 2007
1 parent 360737a commit ab6fc95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ab6fc95

Please sign in to comment.