revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36
[firefly-linux-kernel-4.4.55.git] / drivers / ata / libahci.c
index 137514dbbf65a5e491295dbf1e23481ac6582aaf..8eea309ea21231fcb50ff0498a366ff8a8a1dcf7 100644 (file)
@@ -1830,24 +1830,12 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
 static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
 {
        struct ahci_port_priv *pp = qc->ap->private_data;
-       u8 *rx_fis = pp->rx_fis;
+       u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
 
        if (pp->fbs_enabled)
-               rx_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
-
-       /*
-        * After a successful execution of an ATA PIO data-in command,
-        * the device doesn't send D2H Reg FIS to update the TF and
-        * the host should take TF and E_Status from the preceding PIO
-        * Setup FIS.
-        */
-       if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE &&
-           !(qc->flags & ATA_QCFLAG_FAILED)) {
-               ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf);
-               qc->result_tf.command = (rx_fis + RX_FIS_PIO_SETUP)[15];
-       } else
-               ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf);
+               d2h_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
 
+       ata_tf_from_fis(d2h_fis, &qc->result_tf);
        return true;
 }