Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72892
b: refs/heads/master
c: f90f082
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 30, 2007
1 parent 872b361 commit d27c9a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 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: b666da35d900c26cbea1caa465649e2e0afa406c
refs/heads/master: f90f0828e57e97cb1ff19520d252882cfc6fb3c0
16 changes: 11 additions & 5 deletions trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1800,10 +1800,8 @@ static void ata_eh_link_autopsy(struct ata_link *link)
qc->err_mask &= ~AC_ERR_OTHER;

/* SENSE_VALID trumps dev/unknown error and revalidation */
if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
if (qc->flags & ATA_QCFLAG_SENSE_VALID)
qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
ehc->i.action &= ~ATA_EH_REVALIDATE;
}

/* accumulate error info */
ehc->i.dev = qc->dev;
Expand All @@ -1816,7 +1814,8 @@ static void ata_eh_link_autopsy(struct ata_link *link)
if (ap->pflags & ATA_PFLAG_FROZEN ||
all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT))
ehc->i.action |= ATA_EH_SOFTRESET;
else if (all_err_mask)
else if ((is_io && all_err_mask) ||
(!is_io && (all_err_mask & ~AC_ERR_DEV)))
ehc->i.action |= ATA_EH_REVALIDATE;

/* if we have offending qcs and the associated failed device */
Expand Down Expand Up @@ -2697,8 +2696,15 @@ void ata_eh_finish(struct ata_port *ap)
/* FIXME: Once EH migration is complete,
* generate sense data in this function,
* considering both err_mask and tf.
*
* There's no point in retrying invalid
* (detected by libata) and non-IO device
* errors (rejected by device). Finish them
* immediately.
*/
if (qc->err_mask & AC_ERR_INVALID)
if ((qc->err_mask & AC_ERR_INVALID) ||
(!(qc->flags & ATA_QCFLAG_IO) &&
qc->err_mask == AC_ERR_DEV))
ata_eh_qc_complete(qc);
else
ata_eh_qc_retry(qc);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ static struct sil24_cerr_info {
unsigned int err_mask, action;
const char *desc;
} sil24_cerr_db[] = {
[0] = { AC_ERR_DEV, ATA_EH_REVALIDATE,
[0] = { AC_ERR_DEV, 0,
"device error" },
[PORT_CERR_DEV] = { AC_ERR_DEV, ATA_EH_REVALIDATE,
[PORT_CERR_DEV] = { AC_ERR_DEV, 0,
"device error via D2H FIS" },
[PORT_CERR_SDB] = { AC_ERR_DEV, ATA_EH_REVALIDATE,
[PORT_CERR_SDB] = { AC_ERR_DEV, 0,
"device error via SDB FIS" },
[PORT_CERR_DATA] = { AC_ERR_ATA_BUS, ATA_EH_SOFTRESET,
"error in data FIS" },
Expand Down

0 comments on commit d27c9a2

Please sign in to comment.