]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ata/ahci.c
libata: implement ata_wait_after_reset()
[mv-sheeva.git] / drivers / ata / ahci.c
index 49cf4cf1a5a2959c6dbf1921e19592775db827e6..93bcb2cb3d35703700d8008bb60a9106d3112c35 100644 (file)
@@ -1153,15 +1153,8 @@ static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
        tf.ctl &= ~ATA_SRST;
        ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0);
 
-       /* spec mandates ">= 2ms" before checking status.
-        * We wait 150ms, because that was the magic delay used for
-        * ATAPI devices in Hale Landis's ATADRVR, for the period of time
-        * between when the ATA command register is written, and then
-        * status is checked.  Because waiting for "a while" before
-        * checking status is fine, post SRST, we perform this magic
-        * delay here as well.
-        */
-       msleep(150);
+       /* wait a while before checking status */
+       ata_wait_after_reset(ap, deadline);
 
        rc = ata_wait_ready(ap, deadline);
        /* link occupied, -ENODEV too is an error */