|
@@ -1142,12 +1142,15 @@ static int ahci_reset_controller(struct ata_host *host)
|
|
readl(mmio + HOST_CTL); /* flush */
|
|
readl(mmio + HOST_CTL); /* flush */
|
|
}
|
|
}
|
|
|
|
|
|
- /* reset must complete within 1 second, or
|
|
|
|
|
|
+ /*
|
|
|
|
+ * to perform host reset, OS should set HOST_RESET
|
|
|
|
+ * and poll until this bit is read to be "0".
|
|
|
|
+ * reset must complete within 1 second, or
|
|
* the hardware should be considered fried.
|
|
* the hardware should be considered fried.
|
|
*/
|
|
*/
|
|
- ssleep(1);
|
|
|
|
|
|
+ tmp = ata_wait_register(mmio + HOST_CTL, HOST_RESET,
|
|
|
|
+ HOST_RESET, 10, 1000);
|
|
|
|
|
|
- tmp = readl(mmio + HOST_CTL);
|
|
|
|
if (tmp & HOST_RESET) {
|
|
if (tmp & HOST_RESET) {
|
|
dev_printk(KERN_ERR, host->dev,
|
|
dev_printk(KERN_ERR, host->dev,
|
|
"controller reset failed (0x%x)\n", tmp);
|
|
"controller reset failed (0x%x)\n", tmp);
|