Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cc3eb1148e4b2dfabf7a1dcf36fd8be1331ca95 Commit: 3cc3eb1148e4b2dfabf7a1dcf36fd8be1331ca95 Parent: b90fe23bd51c6b1c298159591c833bdd24f55002 Author: Jeff Garzik <[EMAIL PROTECTED]> AuthorDate: Wed Sep 26 00:02:41 2007 -0400 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Oct 12 14:55:42 2007 -0400
[libata] AHCI: enable AHCI mode, before using AHCI reset AHCI spec says host-reset bit may only be set when the ahci-enable bit is also set. Noticed by Peer Chen <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/ahci.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9f3c591..b615390 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -827,8 +827,14 @@ static int ahci_reset_controller(struct ata_host *host) void __iomem *mmio = host->iomap[AHCI_PCI_BAR]; u32 tmp; - /* global controller reset */ + /* we must be in AHCI mode, before using anything + * AHCI-specific, such as HOST_RESET. + */ tmp = readl(mmio + HOST_CTL); + if (!(tmp & HOST_AHCI_EN)) + writel(tmp | HOST_AHCI_EN, mmio + HOST_CTL); + + /* global controller reset */ if ((tmp & HOST_RESET) == 0) { writel(tmp | HOST_RESET, mmio + HOST_CTL); readl(mmio + HOST_CTL); /* flush */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html