]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/cmd64x.c
cmd64x: don't clear the other channel's interrupt
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / cmd64x.c
index adee2ef6fd710b5a9b973a37d708239cf671b95d..51fca441c2946c59e69b0b9638ab88dee7f808c5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/cmd64x.c              Version 1.50    May 10, 2007
+ * linux/drivers/ide/pci/cmd64x.c              Version 1.51    Nov 8, 2007
  *
  * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
  *           Due to massive hardware bugs, UltraDMA is only supported
@@ -339,7 +339,8 @@ static int cmd648_ide_dma_end (ide_drive_t *drive)
        u8  mrdmode             = inb(hwif->dma_master + 0x01);
 
        /* clear the interrupt bit */
-       outb(mrdmode | irq_mask, hwif->dma_master + 0x01);
+       outb((mrdmode & ~(MRDMODE_INTR_CH0 | MRDMODE_INTR_CH1)) | irq_mask,
+            hwif->dma_master + 0x01);
 
        return err;
 }
@@ -535,7 +536,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
                hwif->ide_dma_test_irq  = &cmd648_ide_dma_test_irq;
                break;
        case PCI_DEVICE_ID_CMD_646:
-               hwif->chipset = ide_cmd646;
                if (dev->revision == 0x01) {
                        hwif->ide_dma_end = &cmd646_1_ide_dma_end;
                        break;
@@ -549,7 +549,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
        }
 }
 
-static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
+static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
        {       /* 0 */
                .name           = "CMD643",
                .init_chipset   = init_chipset_cmd64x,
@@ -573,6 +573,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
                .init_chipset   = init_chipset_cmd64x,
                .init_hwif      = init_hwif_cmd64x,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
+               .chipset        = ide_cmd646,
                .host_flags     = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
                .pio_mask       = ATA_PIO5,
                .mwdma_mask     = ATA_MWDMA2,
@@ -591,7 +592,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
 
 static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       ide_pci_device_t d;
+       struct ide_port_info d;
        u8 idx = id->driver_data;
 
        d = cmd64x_chipsets[idx];