]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_sl82c105.c
sata_nv: enable hotplug interrupt and fix some readl/readw mismatches
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_sl82c105.c
index e94f515ef54b6468199a78d92d5fc77e52e935de..96e890fd645b671247069881385de1c36d0abdb0 100644 (file)
@@ -139,13 +139,13 @@ static void sl82c105_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 {
        switch(adev->dma_mode) {
                case XFER_MW_DMA_0:
-                       sl82c105_configure_piomode(ap, adev, 1);
+                       sl82c105_configure_piomode(ap, adev, 0);
                        break;
                case XFER_MW_DMA_1:
                        sl82c105_configure_piomode(ap, adev, 3);
                        break;
                case XFER_MW_DMA_2:
-                       sl82c105_configure_piomode(ap, adev, 3);
+                       sl82c105_configure_piomode(ap, adev, 4);
                        break;
                default:
                        BUG();
@@ -187,7 +187,9 @@ static void sl82c105_bmdma_start(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
 
+       udelay(100);
        sl82c105_reset_engine(ap);
+       udelay(100);
 
        /* Set the clocks for DMA */
        sl82c105_configure_dmamode(ap, qc->dev);
@@ -216,6 +218,7 @@ static void sl82c105_bmdma_stop(struct ata_queued_cmd *qc)
 
        ata_bmdma_stop(qc);
        sl82c105_reset_engine(ap);
+       udelay(100);
 
        /* This will redo the initial setup of the DMA device to matching
           PIO timings */
@@ -262,14 +265,14 @@ static struct ata_port_operations sl82c105_port_ops = {
        .qc_prep        = ata_qc_prep,
        .qc_issue       = ata_qc_issue_prot,
 
-       .data_xfer      = ata_pio_data_xfer,
+       .data_xfer      = ata_data_xfer,
 
        .irq_handler    = ata_interrupt,
        .irq_clear      = ata_bmdma_irq_clear,
+       .irq_on         = ata_irq_on,
+       .irq_ack        = ata_irq_ack,
 
        .port_start     = ata_port_start,
-       .port_stop      = ata_port_stop,
-       .host_stop      = ata_host_stop
 };
 
 /**