aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-eh.c19
-rw-r--r--drivers/ata/sata_inic162x.c2
-rw-r--r--drivers/ata/sata_sil24.c3
3 files changed, 1 insertions, 23 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 99f83bdc572b..88cdc4938bea 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2052,15 +2052,13 @@ static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset,
2052 classes[dev->devno] = ATA_DEV_UNKNOWN; 2052 classes[dev->devno] = ATA_DEV_UNKNOWN;
2053 2053
2054 rc = reset(link, classes, deadline); 2054 rc = reset(link, classes, deadline);
2055 if (rc)
2056 return rc;
2057 2055
2058 /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */ 2056 /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */
2059 ata_link_for_each_dev(dev, link) 2057 ata_link_for_each_dev(dev, link)
2060 if (classes[dev->devno] == ATA_DEV_UNKNOWN) 2058 if (classes[dev->devno] == ATA_DEV_UNKNOWN)
2061 classes[dev->devno] = ATA_DEV_NONE; 2059 classes[dev->devno] = ATA_DEV_NONE;
2062 2060
2063 return 0; 2061 return rc;
2064} 2062}
2065 2063
2066static int ata_eh_followup_srst_needed(struct ata_link *link, 2064static int ata_eh_followup_srst_needed(struct ata_link *link,
@@ -2209,21 +2207,6 @@ int ata_eh_reset(struct ata_link *link, int classify,
2209 if (rc && rc != -EAGAIN) 2207 if (rc && rc != -EAGAIN)
2210 goto fail; 2208 goto fail;
2211 2209
2212 /* was classification successful? */
2213 if (classify && classes[0] == ATA_DEV_UNKNOWN &&
2214 !(lflags & ATA_LFLAG_ASSUME_CLASS)) {
2215 if (try < max_tries) {
2216 ata_link_printk(link, KERN_WARNING,
2217 "classification failed\n");
2218 rc = -EINVAL;
2219 goto fail;
2220 }
2221
2222 ata_link_printk(link, KERN_WARNING,
2223 "classfication failed, assuming ATA\n");
2224 lflags |= ATA_LFLAG_ASSUME_ATA;
2225 }
2226
2227 done: 2210 done:
2228 ata_link_for_each_dev(dev, link) { 2211 ata_link_for_each_dev(dev, link) {
2229 /* After the reset, the device state is PIO 0 and the 2212 /* After the reset, the device state is PIO 0 and the
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 9f47d0022453..d27bb9a2568f 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -428,8 +428,6 @@ static int inic_hardreset(struct ata_link *link, unsigned int *class,
428 428
429 ata_sff_tf_read(ap, &tf); 429 ata_sff_tf_read(ap, &tf);
430 *class = ata_dev_classify(&tf); 430 *class = ata_dev_classify(&tf);
431 if (*class == ATA_DEV_UNKNOWN)
432 *class = ATA_DEV_NONE;
433 } 431 }
434 432
435 return 0; 433 return 0;
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 068789361895..20757fa6115d 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -693,9 +693,6 @@ static int sil24_softreset(struct ata_link *link, unsigned int *class,
693 sil24_read_tf(ap, 0, &tf); 693 sil24_read_tf(ap, 0, &tf);
694 *class = ata_dev_classify(&tf); 694 *class = ata_dev_classify(&tf);
695 695
696 if (*class == ATA_DEV_UNKNOWN)
697 *class = ATA_DEV_NONE;
698
699 out: 696 out:
700 DPRINTK("EXIT, class=%u\n", *class); 697 DPRINTK("EXIT, class=%u\n", *class);
701 return 0; 698 return 0;