Patch 2.6.32.33 to 2.6.32.35
/drivers/ata/libata-core.c
blob:d4f7f99ccdd7b0f09dde41d18c7b8cbe7f3fc64c -> blob:6a96da69c482abef92f6c0cc7ce0d2113706bd30
--- drivers/ata/libata-core.c
+++ drivers/ata/libata-core.c
@@ -5016,6 +5016,9 @@ static void ata_verify_xfer(struct ata_q
{
struct ata_device *dev = qc->dev;
+ if (ata_tag_internal(qc->tag))
+ return;
+
if (ata_is_nodata(qc->tf.protocol))
return;
@@ -5059,23 +5062,14 @@ void ata_qc_complete(struct ata_queued_c
if (unlikely(qc->err_mask))
qc->flags |= ATA_QCFLAG_FAILED;
- /*
- * Finish internal commands without any further processing
- * and always with the result TF filled.
- */
- if (unlikely(ata_tag_internal(qc->tag))) {
- fill_result_tf(qc);
- __ata_qc_complete(qc);
- return;
- }
-
- /*
- * Non-internal qc has failed. Fill the result TF and
- * summon EH.
- */
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+ /* always fill result TF for failed qc */
fill_result_tf(qc);
- ata_qc_schedule_eh(qc);
+
+ if (!ata_tag_internal(qc->tag))
+ ata_qc_schedule_eh(qc);
+ else
+ __ata_qc_complete(qc);
return;
}
@@ -5510,7 +5504,6 @@ static int ata_host_request_pm(struct at
*/
int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
{
- unsigned int ehi_flags = ATA_EHI_QUIET;
int rc;
/*
@@ -5519,18 +5512,7 @@ int ata_host_suspend(struct ata_host *ho
*/
ata_lpm_enable(host);
- /*
- * On some hardware, device fails to respond after spun down
- * for suspend. As the device won't be used before being
- * resumed, we don't need to touch the device. Ask EH to skip
- * the usual stuff and proceed directly to suspend.
- *
- * http://thread.gmane.org/gmane.linux.ide/46764
- */
- if (mesg.event == PM_EVENT_SUSPEND)
- ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY;
-
- rc = ata_host_request_pm(host, mesg, 0, ehi_flags, 1);
+ rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
if (rc == 0)
host->dev->power.power_state = mesg;
return rc;