virtio-blk: Use block layer provided spinlock
[firefly-linux-kernel-4.4.55.git] / drivers / ata / libata-core.c
index cece3a4d11eaeb70bf2323a53f027d28439bd543..fadd5866d40fd29b2eb70df29e3d026e2e3722db 100644 (file)
@@ -80,6 +80,8 @@ const struct ata_port_operations ata_base_port_ops = {
        .prereset               = ata_std_prereset,
        .postreset              = ata_std_postreset,
        .error_handler          = ata_std_error_handler,
+       .sched_eh               = ata_std_sched_eh,
+       .end_eh                 = ata_std_end_eh,
 };
 
 const struct ata_port_operations sata_port_ops = {
@@ -2374,6 +2376,9 @@ int ata_dev_configure(struct ata_device *dev)
                        dma_dir_string = ", DMADIR";
                }
 
+               if (ata_id_has_da(dev->id))
+                       dev->flags |= ATA_DFLAG_DA;
+
                /* print device info to dmesg */
                if (ata_msg_drv(ap) && print_info)
                        ata_dev_info(dev,
@@ -4126,6 +4131,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 
        /* Devices which aren't very happy with higher link speeds */
        { "WD My Book",                 NULL,   ATA_HORKAGE_1_5_GBPS, },
+       { "Seagate FreeAgent GoFlex",   NULL,   ATA_HORKAGE_1_5_GBPS, },
 
        /*
         * Devices which choke on SETXFER.  Applies only if both the
@@ -5288,8 +5294,6 @@ static int ata_port_request_pm(struct ata_port *ap, pm_message_t mesg,
        return rc;
 }
 
-#define to_ata_port(d) container_of(d, struct ata_port, tdev)
-
 static int ata_port_suspend_common(struct device *dev, pm_message_t mesg)
 {
        struct ata_port *ap = to_ata_port(dev);
@@ -6051,9 +6055,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
        if (rc)
                goto err_tadd;
 
-       /* associate with ACPI nodes */
-       ata_acpi_associate(host);
-
        /* set cable, sata_spd_limit and report */
        for (i = 0; i < host->n_ports; i++) {
                struct ata_port *ap = host->ports[i];
@@ -6513,6 +6514,8 @@ static int __init ata_init(void)
 
        ata_parse_force_param();
 
+       ata_acpi_register();
+
        rc = ata_sff_init();
        if (rc) {
                kfree(ata_force_tbl);
@@ -6539,6 +6542,7 @@ static void __exit ata_exit(void)
        ata_release_transport(ata_scsi_transport_template);
        libata_transport_exit();
        ata_sff_exit();
+       ata_acpi_unregister();
        kfree(ata_force_tbl);
 }
 
@@ -6642,6 +6646,8 @@ struct ata_port_operations ata_dummy_port_ops = {
        .qc_prep                = ata_noop_qc_prep,
        .qc_issue               = ata_dummy_qc_issue,
        .error_handler          = ata_dummy_error_handler,
+       .sched_eh               = ata_std_sched_eh,
+       .end_eh                 = ata_std_end_eh,
 };
 
 const struct ata_port_info ata_dummy_port_info = {