]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/libata-core.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[karo-tx-linux.git] / drivers / ata / libata-core.c
index 23763a1ec570aa08149e23f65de1a7fb0087c860..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 = {
@@ -1973,6 +1975,12 @@ retry:
        if (class == ATA_DEV_ATA) {
                if (!ata_id_is_ata(id) && !ata_id_is_cfa(id))
                        goto err_out;
+               if (ap->host->flags & ATA_HOST_IGNORE_ATA &&
+                                                       ata_id_is_ata(id)) {
+                       ata_dev_dbg(dev,
+                               "host indicates ignore ATA devices, ignored\n");
+                       return -ENOENT;
+               }
        } else {
                if (ata_id_is_ata(id))
                        goto err_out;
@@ -2368,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,
@@ -4051,6 +4062,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "_NEC DV5800A",       NULL,           ATA_HORKAGE_NODMA },
        { "SAMSUNG CD-ROM SN-124", "N001",      ATA_HORKAGE_NODMA },
        { "Seagate STT20000A", NULL,            ATA_HORKAGE_NODMA },
+       { "2GB ATA Flash Disk", "ADMA428M",     ATA_HORKAGE_NODMA },
        /* Odd clown on sil3726/4726 PMPs */
        { "Config  Disk",       NULL,           ATA_HORKAGE_DISABLE },
 
@@ -4119,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
@@ -5281,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);
@@ -6044,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];
@@ -6506,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);
@@ -6532,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);
 }
 
@@ -6635,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 = {