Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[safe/jmp/linux-2.6] / drivers / ata / pdc_adma.c
index 6a4654e..6c65b07 100644 (file)
@@ -131,7 +131,6 @@ struct adma_port_priv {
 static int adma_ata_init_one(struct pci_dev *pdev,
                                const struct pci_device_id *ent);
 static int adma_port_start(struct ata_port *ap);
-static void adma_host_stop(struct ata_host *host);
 static void adma_port_stop(struct ata_port *ap);
 static void adma_qc_prep(struct ata_queued_cmd *qc);
 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
@@ -149,6 +148,8 @@ static struct scsi_host_template adma_ata_sht = {
 static struct ata_port_operations adma_ata_ops = {
        .inherits               = &ata_sff_port_ops,
 
+       .lost_interrupt         = ATA_OP_NULL,
+
        .check_atapi_dma        = adma_check_atapi_dma,
        .qc_prep                = adma_qc_prep,
        .qc_issue               = adma_qc_issue,
@@ -159,7 +160,6 @@ static struct ata_port_operations adma_ata_ops = {
 
        .port_start             = adma_port_start,
        .port_stop              = adma_port_stop,
-       .host_stop              = adma_host_stop,
 };
 
 static struct ata_port_info adma_port_info[] = {
@@ -168,7 +168,7 @@ static struct ata_port_info adma_port_info[] = {
                .flags          = ATA_FLAG_SLAVE_POSS |
                                  ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO |
                                  ATA_FLAG_PIO_POLLING,
-               .pio_mask       = 0x10, /* pio4 */
+               .pio_mask       = ATA_PIO4_ONLY,
                .udma_mask      = ATA_UDMA4,
                .port_ops       = &adma_ata_ops,
        },
@@ -210,7 +210,7 @@ static void adma_reinit_engine(struct ata_port *ap)
 
        /* mask/clear ATA interrupts */
        writeb(ATA_NIEN, ap->ioaddr.ctl_addr);
-       ata_check_status(ap);
+       ata_sff_check_status(ap);
 
        /* reset the ADMA engine */
        adma_reset_engine(ap);
@@ -245,7 +245,7 @@ static void adma_freeze(struct ata_port *ap)
 
        /* mask/clear ATA interrupts */
        writeb(ATA_NIEN, ap->ioaddr.ctl_addr);
-       ata_check_status(ap);
+       ata_sff_check_status(ap);
 
        /* reset ADMA to idle state */
        writew(aPIOMD4 | aNIEN | aRSTADM, chan + ADMA_CONTROL);
@@ -268,7 +268,7 @@ static int adma_prereset(struct ata_link *link, unsigned long deadline)
                pp->state = adma_state_mmio;
        adma_reinit_engine(ap);
 
-       return ata_std_prereset(link, deadline);
+       return ata_sff_prereset(link, deadline);
 }
 
 static int adma_fill_sg(struct ata_queued_cmd *qc)
@@ -324,7 +324,7 @@ static void adma_qc_prep(struct ata_queued_cmd *qc)
 
        adma_enter_reg_mode(qc->ap);
        if (qc->tf.protocol != ATA_PROT_DMA) {
-               ata_qc_prep(qc);
+               ata_sff_qc_prep(qc);
                return;
        }
 
@@ -423,7 +423,7 @@ static unsigned int adma_qc_issue(struct ata_queued_cmd *qc)
        }
 
        pp->state = adma_state_mmio;
-       return ata_qc_issue_prot(qc);
+       return ata_sff_qc_issue(qc);
 }
 
 static inline unsigned int adma_intr_pkt(struct ata_host *host)
@@ -494,7 +494,7 @@ static inline unsigned int adma_intr_mmio(struct ata_host *host)
                        if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
 
                                /* check main status, clearing INTRQ */
-                               u8 status = ata_check_status(ap);
+                               u8 status = ata_sff_check_status(ap);
                                if ((status & ATA_BUSY))
                                        continue;
                                DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n",
@@ -591,14 +591,6 @@ static void adma_port_stop(struct ata_port *ap)
        adma_reset_engine(ap);
 }
 
-static void adma_host_stop(struct ata_host *host)
-{
-       unsigned int port_no;
-
-       for (port_no = 0; port_no < ADMA_PORTS; ++port_no)
-               adma_reset_engine(host->ports[port_no]);
-}
-
 static void adma_host_init(struct ata_host *host, unsigned int chip_id)
 {
        unsigned int port_no;
@@ -615,13 +607,13 @@ static int adma_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
 {
        int rc;
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                        "32-bit DMA enable failed\n");
                return rc;
        }
-       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                        "32-bit consistent DMA enable failed\n");