aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cmd64x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r--drivers/ide/pci/cmd64x.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 336d02f58010..f165bf1c06dc 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/cmd64x.c Version 1.43 Mar 10, 2007 2 * linux/drivers/ide/pci/cmd64x.c Version 1.44 Mar 12, 2007
3 * 3 *
4 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines. 4 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
5 * Due to massive hardware bugs, UltraDMA is only supported 5 * Due to massive hardware bugs, UltraDMA is only supported
@@ -36,7 +36,7 @@
36 * CMD64x specific registers definition. 36 * CMD64x specific registers definition.
37 */ 37 */
38#define CFR 0x50 38#define CFR 0x50
39#define CFR_INTR_CH0 0x02 39#define CFR_INTR_CH0 0x04
40#define CNTRL 0x51 40#define CNTRL 0x51
41#define CNTRL_DIS_RA0 0x40 41#define CNTRL_DIS_RA0 0x40
42#define CNTRL_DIS_RA1 0x80 42#define CNTRL_DIS_RA1 0x80
@@ -488,19 +488,19 @@ static int cmd64x_ide_dma_end (ide_drive_t *drive)
488 488
489static int cmd64x_ide_dma_test_irq (ide_drive_t *drive) 489static int cmd64x_ide_dma_test_irq (ide_drive_t *drive)
490{ 490{
491 ide_hwif_t *hwif = HWIF(drive); 491 ide_hwif_t *hwif = HWIF(drive);
492 struct pci_dev *dev = hwif->pci_dev; 492 struct pci_dev *dev = hwif->pci_dev;
493 u8 dma_alt_stat = 0, mask = (hwif->channel) ? MRDMODE_INTR_CH1 : 493 u8 irq_reg = hwif->channel ? ARTTIM23 : CFR;
494 MRDMODE_INTR_CH0; 494 u8 irq_stat = 0, mask = hwif->channel ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
495 u8 dma_stat = inb(hwif->dma_status); 495 u8 dma_stat = inb(hwif->dma_status);
496
497 (void) pci_read_config_byte(dev, irq_reg, &irq_stat);
496 498
497 (void) pci_read_config_byte(dev, MRDMODE, &dma_alt_stat);
498#ifdef DEBUG 499#ifdef DEBUG
499 printk("%s: dma_stat: 0x%02x dma_alt_stat: " 500 printk("%s: dma_stat: 0x%02x irq_stat: 0x%02x mask: 0x%02x\n",
500 "0x%02x mask: 0x%02x\n", drive->name, 501 drive->name, dma_stat, irq_stat, mask);
501 dma_stat, dma_alt_stat, mask);
502#endif 502#endif
503 if (!(dma_alt_stat & mask)) 503 if (!(irq_stat & mask))
504 return 0; 504 return 0;
505 505
506 /* return 1 if INTR asserted */ 506 /* return 1 if INTR asserted */