[libata] Remove ->port_disable() hook
[firefly-linux-kernel-4.4.55.git] / drivers / ata / pata_cs5520.c
index 1aabe15ad9d3df329dad998863737e8b1e2785e3..fe37e3e80f27bd41965c6c818a3227bd6e4a2244 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_cs5520"
-#define DRV_VERSION    "0.6.5"
+#define DRV_VERSION    "0.6.6"
 
 struct pio_clocks
 {
@@ -146,7 +146,7 @@ static struct scsi_host_template cs5520_sht = {
        .queuecommand           = ata_scsi_queuecmd,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
-       .sg_tablesize           = LIBATA_MAX_PRD,
+       .sg_tablesize           = LIBATA_DUMB_MAX_PRD,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = ATA_SHT_USE_CLUSTERING,
@@ -158,7 +158,6 @@ static struct scsi_host_template cs5520_sht = {
 };
 
 static struct ata_port_operations cs5520_port_ops = {
-       .port_disable           = ata_port_disable,
        .set_piomode            = cs5520_set_piomode,
        .set_dmamode            = cs5520_set_dmamode,
 
@@ -178,13 +177,12 @@ static struct ata_port_operations cs5520_port_ops = {
        .bmdma_start            = ata_bmdma_start,
        .bmdma_stop             = ata_bmdma_stop,
        .bmdma_status           = ata_bmdma_status,
-       .qc_prep                = ata_qc_prep,
+       .qc_prep                = ata_dumb_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
 
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
-       .irq_ack                = ata_irq_ack,
 
        .port_start             = ata_port_start,
 };
@@ -275,7 +273,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
 
        for (i = 0; i < 2; i++) {
                static const int irq[] = { 14, 15 };
-               struct ata_port *ap = host->ports[0];
+               struct ata_port *ap = host->ports[i];
 
                if (ata_port_is_dummy(ap))
                        continue;
@@ -284,6 +282,11 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
                                      ata_interrupt, 0, DRV_NAME, host);
                if (rc)
                        return rc;
+
+               if (i == 0)
+                       host->irq = irq[0];
+               else
+                       host->irq2 = irq[1];
        }
 
        return ata_host_register(host, &cs5520_sht);