diff --git a/[refs] b/[refs] index 29e24ff3bdc1..0841a6159a46 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b90fe23bd51c6b1c298159591c833bdd24f55002 +refs/heads/master: 3cc3eb1148e4b2dfabf7a1dcf36fd8be1331ca95 diff --git a/trunk/drivers/ata/ahci.c b/trunk/drivers/ata/ahci.c index 9f3c591c7214..b615390b6b8a 100644 --- a/trunk/drivers/ata/ahci.c +++ b/trunk/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 */