浏览代码

libata: add 150ms between completion of hardreset and status checking

Follow the old SRST rule and delay 150ms between completion of
hardreset and status checking.  Debouncing delay should usually cover
this but debounce duration could be shorter than 150ms under certain
circumstances.

Usefulness depends on host controller implementation but it can't hurt
and serves as a reminder that 2s delay for GoVault should also be
added here.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo 18 年之前
父节点
当前提交
34fee227dd
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/ata/libata-core.c

+ 3 - 0
drivers/ata/libata-core.c

@@ -3023,6 +3023,9 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class)
 		return 0;
 		return 0;
 	}
 	}
 
 
+	/* wait a while before checking status, see SRST for more info */
+	msleep(150);
+
 	if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
 	if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
 		ata_port_printk(ap, KERN_ERR,
 		ata_port_printk(ap, KERN_ERR,
 				"COMRESET failed (device not ready)\n");
 				"COMRESET failed (device not ready)\n");