Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[linux-2.6-microblaze.git] / drivers / ata / libata-eh.c
index 7951fd9..3307ed4 100644 (file)
@@ -1386,7 +1386,7 @@ unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key)
 
        err_mask = ata_exec_internal(dev, &tf, cdb, DMA_NONE, NULL, 0, 0);
        if (err_mask == AC_ERR_DEV)
-               *r_sense_key = tf.feature >> 4;
+               *r_sense_key = tf.error >> 4;
        return err_mask;
 }
 
@@ -1429,12 +1429,12 @@ static void ata_eh_request_sense(struct ata_queued_cmd *qc,
 
        err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
        /* Ignore err_mask; ATA_ERR might be set */
-       if (tf.command & ATA_SENSE) {
+       if (tf.status & ATA_SENSE) {
                ata_scsi_set_sense(dev, cmd, tf.lbah, tf.lbam, tf.lbal);
                qc->flags |= ATA_QCFLAG_SENSE_VALID;
        } else {
                ata_dev_warn(dev, "request sense failed stat %02x emask %x\n",
-                            tf.command, err_mask);
+                            tf.status, err_mask);
        }
 }
 
@@ -1557,7 +1557,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
                                      const struct ata_taskfile *tf)
 {
        unsigned int tmp, action = 0;
-       u8 stat = tf->command, err = tf->feature;
+       u8 stat = tf->status, err = tf->error;
 
        if ((stat & (ATA_BUSY | ATA_DRQ | ATA_DRDY)) != ATA_DRDY) {
                qc->err_mask |= AC_ERR_HSM;
@@ -1594,7 +1594,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
                if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) {
                        tmp = atapi_eh_request_sense(qc->dev,
                                                qc->scsicmd->sense_buffer,
-                                               qc->result_tf.feature >> 4);
+                                               qc->result_tf.error >> 4);
                        if (!tmp)
                                qc->flags |= ATA_QCFLAG_SENSE_VALID;
                        else
@@ -2360,7 +2360,7 @@ static void ata_eh_link_report(struct ata_link *link)
                        cmd->hob_feature, cmd->hob_nsect,
                        cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah,
                        cmd->device, qc->tag, data_buf, cdb_buf,
-                       res->command, res->feature, res->nsect,
+                       res->status, res->error, res->nsect,
                        res->lbal, res->lbam, res->lbah,
                        res->hob_feature, res->hob_nsect,
                        res->hob_lbal, res->hob_lbam, res->hob_lbah,
@@ -2368,28 +2368,28 @@ static void ata_eh_link_report(struct ata_link *link)
                        qc->err_mask & AC_ERR_NCQ ? " <F>" : "");
 
 #ifdef CONFIG_ATA_VERBOSE_ERROR
-               if (res->command & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ |
-                                   ATA_SENSE | ATA_ERR)) {
-                       if (res->command & ATA_BUSY)
+               if (res->status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ |
+                                  ATA_SENSE | ATA_ERR)) {
+                       if (res->status & ATA_BUSY)
                                ata_dev_err(qc->dev, "status: { Busy }\n");
                        else
                                ata_dev_err(qc->dev, "status: { %s%s%s%s%s}\n",
-                                 res->command & ATA_DRDY ? "DRDY " : "",
-                                 res->command & ATA_DF ? "DF " : "",
-                                 res->command & ATA_DRQ ? "DRQ " : "",
-                                 res->command & ATA_SENSE ? "SENSE " : "",
-                                 res->command & ATA_ERR ? "ERR " : "");
+                                 res->status & ATA_DRDY ? "DRDY " : "",
+                                 res->status & ATA_DF ? "DF " : "",
+                                 res->status & ATA_DRQ ? "DRQ " : "",
+                                 res->status & ATA_SENSE ? "SENSE " : "",
+                                 res->status & ATA_ERR ? "ERR " : "");
                }
 
                if (cmd->command != ATA_CMD_PACKET &&
-                   (res->feature & (ATA_ICRC | ATA_UNC | ATA_AMNF |
-                                    ATA_IDNF | ATA_ABORTED)))
+                   (res->error & (ATA_ICRC | ATA_UNC | ATA_AMNF | ATA_IDNF |
+                                  ATA_ABORTED)))
                        ata_dev_err(qc->dev, "error: { %s%s%s%s%s}\n",
-                         res->feature & ATA_ICRC ? "ICRC " : "",
-                         res->feature & ATA_UNC ? "UNC " : "",
-                         res->feature & ATA_AMNF ? "AMNF " : "",
-                         res->feature & ATA_IDNF ? "IDNF " : "",
-                         res->feature & ATA_ABORTED ? "ABRT " : "");
+                                   res->error & ATA_ICRC ? "ICRC " : "",
+                                   res->error & ATA_UNC ? "UNC " : "",
+                                   res->error & ATA_AMNF ? "AMNF " : "",
+                                   res->error & ATA_IDNF ? "IDNF " : "",
+                                   res->error & ATA_ABORTED ? "ABRT " : "");
 #endif
        }
 }
@@ -3902,11 +3902,6 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)
                }
        }
 
-       /* tell ACPI we're suspending */
-       rc = ata_acpi_on_suspend(ap);
-       if (rc)
-               goto out;
-
        /* suspend */
        ata_eh_freeze_port(ap);
 
@@ -3914,7 +3909,7 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)
                rc = ap->ops->port_suspend(ap, ap->pm_mesg);
 
        ata_acpi_set_state(ap, ap->pm_mesg);
- out:
+
        /* update the flags */
        spin_lock_irqsave(ap->lock, flags);