Merge tag 'ata-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal...
[sfrench/cifs-2.6.git] / drivers / scsi / libsas / sas_ata.c
index cd16a1ac379d3186569ed49dd6d5551d4befcd0d..12e2653846e3f0d93a9dee938eee0ba65df169e2 100644 (file)
@@ -162,7 +162,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
        struct ata_port *ap = qc->ap;
        struct domain_device *dev = ap->private_data;
        struct sas_ha_struct *sas_ha = dev->port->ha;
-       struct Scsi_Host *host = sas_ha->core.shost;
+       struct Scsi_Host *host = sas_ha->shost;
        struct sas_internal *i = to_sas_internal(host->transportt);
 
        /* TODO: we should try to remove that unlock */
@@ -201,12 +201,14 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
                task->data_dir = qc->dma_dir;
        }
        task->scatter = qc->sg;
-       task->ata_task.retry_count = 1;
        qc->lldd_task = task;
 
        task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
        task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol);
 
+       if (qc->flags & ATA_QCFLAG_RESULT_TF)
+               task->ata_task.return_fis_on_success = 1;
+
        if (qc->scsicmd)
                ASSIGN_SAS_TASK(qc->scsicmd, task);
 
@@ -235,7 +237,7 @@ static void sas_ata_qc_fill_rtf(struct ata_queued_cmd *qc)
 
 static struct sas_internal *dev_to_sas_internal(struct domain_device *dev)
 {
-       return to_sas_internal(dev->port->ha->core.shost->transportt);
+       return to_sas_internal(dev->port->ha->shost->transportt);
 }
 
 static int sas_get_ata_command_set(struct domain_device *dev)
@@ -582,7 +584,7 @@ static struct ata_port_info sata_port_info = {
 int sas_ata_init(struct domain_device *found_dev)
 {
        struct sas_ha_struct *ha = found_dev->port->ha;
-       struct Scsi_Host *shost = ha->core.shost;
+       struct Scsi_Host *shost = ha->shost;
        struct ata_host *ata_host;
        struct ata_port *ap;
        int rc;
@@ -817,7 +819,7 @@ static void async_sas_ata_eh(void *data, async_cookie_t cookie)
        struct sas_ha_struct *ha = dev->port->ha;
 
        sas_ata_printk(KERN_DEBUG, dev, "dev error handler\n");
-       ata_scsi_port_error_handler(ha->core.shost, ap);
+       ata_scsi_port_error_handler(ha->shost, ap);
        sas_put_device(dev);
 }