aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c19
1 files changed, 1 insertions, 18 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