]> err.no Git - linux-2.6/blobdiff - drivers/ata/libata-eh.c
usb: Sparc build fix, make USB_ISP1760_OF depend on PPC_OF
[linux-2.6] / drivers / ata / libata-eh.c
index ecbb8e90cb8d1afb76f7314956d1bdd5566d764c..61dcd0026c64c301c8ce43a0ec89e5eebaf755f8 100644 (file)
@@ -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;
 }
@@ -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) {