aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 0319f10d42d5..d9617892fc23 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -960,15 +960,13 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,
960 */ 960 */
961 msleep(150); 961 msleep(150);
962 962
963 *class = ATA_DEV_NONE; 963 rc = ata_wait_ready(ap, deadline);
964 if (ata_port_online(ap)) { 964 /* link occupied, -ENODEV too is an error */
965 rc = ata_wait_ready(ap, deadline); 965 if (rc) {
966 if (rc && rc != -ENODEV) { 966 reason = "device not ready";
967 reason = "device not ready"; 967 goto fail;
968 goto fail;
969 }
970 *class = ahci_dev_classify(ap);
971 } 968 }
969 *class = ahci_dev_classify(ap);
972 970
973 DPRINTK("EXIT, class=%u\n", *class); 971 DPRINTK("EXIT, class=%u\n", *class);
974 return 0; 972 return 0;