X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fata%2Flibata-eh.c;h=62e033146bedae50c7de7126f0f3a8b2aec67b17;hb=10acf3b0d3b46c6ef5d6f0722f72ad9b743ea848;hp=88cdc4938beaca421d66929ce76f03202f399f1c;hpb=2a0c15ca39f5881aa1b472ca856bb7a2e584ece7;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 88cdc4938be..62e033146be 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1357,7 +1357,7 @@ static void ata_eh_analyze_serror(struct ata_link *link) * LOCKING: * Kernel thread context (may sleep). */ -static void ata_eh_analyze_ncq_error(struct ata_link *link) +void ata_eh_analyze_ncq_error(struct ata_link *link) { struct ata_port *ap = link->ap; struct ata_eh_context *ehc = &link->eh_context; @@ -1402,6 +1402,7 @@ static void ata_eh_analyze_ncq_error(struct ata_link *link) /* we've got the perpetrator, condemn it */ qc = __ata_qc_from_tag(ap, tag); memcpy(&qc->result_tf, &tf, sizeof(tf)); + qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48; qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ; ehc->i.err_mask &= ~AC_ERR_DEV; } @@ -2065,7 +2066,7 @@ static int ata_eh_followup_srst_needed(struct ata_link *link, int rc, int classify, const unsigned int *classes) { - if (link->flags & ATA_LFLAG_NO_SRST) + if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link)) return 0; if (rc == -EAGAIN) { if (classify) @@ -2137,9 +2138,14 @@ int ata_eh_reset(struct ata_link *link, int classify, if (hardreset) { reset = hardreset; ehc->i.action = ATA_EH_HARDRESET; - } else { + } else if (softreset) { reset = softreset; ehc->i.action = ATA_EH_SOFTRESET; + } else { + ata_link_printk(link, KERN_ERR, "BUG: no reset method, " + "please report to linux-ide@vger.kernel.org\n"); + dump_stack(); + return -EINVAL; } if (prereset) {