]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/libata-core.c
libata: adjust libata to ignore errors after spinup
[linux-2.6-omap-h63xx.git] / drivers / ata / libata-core.c
index 05922e9f4fade04e2f7a4b837ad15388a1df70bf..99d4fbffb0dfd574acd2f280c960895548254791 100644 (file)
@@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
                tf.protocol = ATA_PROT_NODATA;
                tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
                err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
-               if (err_mask) {
+               if (err_mask && id[2] != 0x738c) {
                        rc = -EIO;
                        reason = "SPINUP failed";
                        goto err_out;
@@ -3788,6 +3788,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "WDC WD740ADFD-00NLR1", NULL,         ATA_HORKAGE_NONCQ, },
        { "FUJITSU MHV2080BH",  "00840028",     ATA_HORKAGE_NONCQ, },
        { "ST9160821AS",        "3.CLF",        ATA_HORKAGE_NONCQ, },
+       { "SAMSUNG HD401LJ",    "ZZ100-15",     ATA_HORKAGE_NONCQ, },
 
        /* Devices with NCQ limits */
 
@@ -6077,6 +6078,9 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
        INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
        INIT_LIST_HEAD(&ap->eh_done_q);
        init_waitqueue_head(&ap->eh_wait_q);
+       init_timer_deferrable(&ap->fastdrain_timer);
+       ap->fastdrain_timer.function = ata_eh_fastdrain_timerfn;
+       ap->fastdrain_timer.data = (unsigned long)ap;
 
        ap->cbl = ATA_CBL_NONE;
 
@@ -6453,7 +6457,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
        for (i = 0; i < host->n_ports; i++) {
                struct ata_port *ap = host->ports[i];
 
-               ata_scsi_scan_host(ap);
+               ata_scsi_scan_host(ap, 1);
        }
 
        return 0;