From: Tejun Heo Date: Fri, 2 Feb 2007 06:29:27 +0000 (+0900) Subject: libata: add 150ms between completion of hardreset and status checking X-Git-Tag: v2.6.21-rc1~274^2~493 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34fee227dd13af593be599b19683464ac4dd4c8b;p=linux-2.6 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 5c2e581bf9..6a2083a6d1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3023,6 +3023,9 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) 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)) { ata_port_printk(ap, KERN_ERR, "COMRESET failed (device not ready)\n");