Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73059
b: refs/heads/master
c: 08cf69d
h: refs/heads/master
i:
  73057: 953039a
  73055: 02b9569
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Nov 3, 2007
1 parent c120bf5 commit f4ac12d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 416dc9ed206bba09807300ee5f155a81cebbd4a1
refs/heads/master: 08cf69d005acda706bc014c61301993758ce9c5f
25 changes: 16 additions & 9 deletions trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2184,25 +2184,32 @@ int ata_eh_reset(struct ata_link *link, int classify,
"follow-up softreset required "
"but no softreset avaliable\n");
rc = -EINVAL;
goto out;
goto fail;
}

ata_eh_about_to_do(link, NULL, ATA_EH_RESET_MASK);
rc = ata_do_reset(link, reset, classes, deadline);

if (rc == 0 && classify && classes[0] == ATA_DEV_UNKNOWN &&
!(lflags & ATA_LFLAG_ASSUME_CLASS)) {
ata_link_printk(link, KERN_ERR,
"classification failed\n");
rc = -EINVAL;
goto out;
}
}

/* -EAGAIN can happen if we skipped followup SRST */
if (rc && rc != -EAGAIN)
goto fail;

/* was classification successful? */
if (classify && classes[0] == ATA_DEV_UNKNOWN &&
!(lflags & ATA_LFLAG_ASSUME_CLASS)) {
if (try < max_tries) {
ata_link_printk(link, KERN_WARNING,
"classification failed\n");
rc = -EINVAL;
goto fail;
}

ata_link_printk(link, KERN_WARNING,
"classfication failed, assuming ATA\n");
lflags |= ATA_LFLAG_ASSUME_ATA;
}

ata_link_for_each_dev(dev, link) {
/* After the reset, the device state is PIO 0 and the
* controller state is undefined. Reset also wakes up
Expand Down

0 comments on commit f4ac12d

Please sign in to comment.