diff options
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index bc553337b1be..f3613bac9dbe 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -333,14 +333,15 @@ static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
333 | static int cmd648_ide_dma_end (ide_drive_t *drive) | 333 | static int cmd648_ide_dma_end (ide_drive_t *drive) |
334 | { | 334 | { |
335 | ide_hwif_t *hwif = HWIF(drive); | 335 | ide_hwif_t *hwif = HWIF(drive); |
336 | unsigned long base = hwif->dma_base - (hwif->channel * 8); | ||
336 | int err = __ide_dma_end(drive); | 337 | int err = __ide_dma_end(drive); |
337 | u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 : | 338 | u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 : |
338 | MRDMODE_INTR_CH0; | 339 | MRDMODE_INTR_CH0; |
339 | u8 mrdmode = inb(hwif->dma_master + 0x01); | 340 | u8 mrdmode = inb(base + 1); |
340 | 341 | ||
341 | /* clear the interrupt bit */ | 342 | /* clear the interrupt bit */ |
342 | outb((mrdmode & ~(MRDMODE_INTR_CH0 | MRDMODE_INTR_CH1)) | irq_mask, | 343 | outb((mrdmode & ~(MRDMODE_INTR_CH0 | MRDMODE_INTR_CH1)) | irq_mask, |
343 | hwif->dma_master + 0x01); | 344 | base + 1); |
344 | 345 | ||
345 | return err; | 346 | return err; |
346 | } | 347 | } |
@@ -365,10 +366,11 @@ static int cmd64x_ide_dma_end (ide_drive_t *drive) | |||
365 | static int cmd648_ide_dma_test_irq (ide_drive_t *drive) | 366 | static int cmd648_ide_dma_test_irq (ide_drive_t *drive) |
366 | { | 367 | { |
367 | ide_hwif_t *hwif = HWIF(drive); | 368 | ide_hwif_t *hwif = HWIF(drive); |
369 | unsigned long base = hwif->dma_base - (hwif->channel * 8); | ||
368 | u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 : | 370 | u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 : |
369 | MRDMODE_INTR_CH0; | 371 | MRDMODE_INTR_CH0; |
370 | u8 dma_stat = inb(hwif->dma_status); | 372 | u8 dma_stat = inb(hwif->dma_status); |
371 | u8 mrdmode = inb(hwif->dma_master + 0x01); | 373 | u8 mrdmode = inb(base + 1); |
372 | 374 | ||
373 | #ifdef DEBUG | 375 | #ifdef DEBUG |
374 | printk("%s: dma_stat: 0x%02x mrdmode: 0x%02x irq_mask: 0x%02x\n", | 376 | printk("%s: dma_stat: 0x%02x mrdmode: 0x%02x irq_mask: 0x%02x\n", |