diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
commit | 3917ac5846dd0f9ad1238166f90caab9912052e6 (patch) | |
tree | 1c298935def4f29edb39192365a65d73de999155 /drivers/block/ns87415.c | |
parent | af2f803c8b2d469fe38e4a7ce952658dfcb6681a (diff) |
o Merge with Linux 2.1.100.
o Cleanup the machine dependencies of floppy and rtc. The driver for
the Dallas thingy in the Indy is still missing.
o Handle allocation of zero'd pages correct for R4000SC / R4400SC.
o Page colouring shit to match the virtual and physical colour of all
mapped pages. This tends to produce extreme fragmentation problems,
so it's deactivated for now. Users of R4000SC / R4400SC may re-enable
the code in arch/mips/mm/init.c by removing the definition of
CONF_GIVE_A_SHIT_ABOUT_COLOURS. Should get them somewhat further -
but don't shake to hard ...
o Fixed ptrace(2)-ing of syscalls, strace is now working again.
o Fix the interrupt forwarding from the keyboard driver to the psaux
driver, PS/2 mice are now working on the Indy. The fix is somewhat
broken as it prevents generic kernels for Indy and machines which handle
things different.
o Things I can't remember.
Diffstat (limited to 'drivers/block/ns87415.c')
-rw-r--r-- | drivers/block/ns87415.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/drivers/block/ns87415.c b/drivers/block/ns87415.c index f312b251c..e7006ed69 100644 --- a/drivers/block/ns87415.c +++ b/drivers/block/ns87415.c @@ -35,7 +35,8 @@ static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) struct pci_dev *dev = hwif->pci_dev; unsigned long flags; - save_flags(flags); cli(); + __save_flags(flags); /* local CPU only */ + __cli(); /* local CPU only */ new = *old; /* adjust IRQ enable bit */ @@ -56,7 +57,7 @@ static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) *old = new; (void) pci_write_config_dword(dev, 0x40, new); } - restore_flags(flags); + __restore_flags(flags); /* local CPU only */ } static void ns87415_selectproc (ide_drive_t *drive) @@ -66,33 +67,25 @@ static void ns87415_selectproc (ide_drive_t *drive) static int ns87415_dmaproc(ide_dma_action_t func, ide_drive_t *drive) { - ide_hwif_t *hwif = HWIF(drive); + ide_hwif_t *hwif = HWIF(drive); + byte dma_stat; switch (func) { case ide_dma_end: /* returns 1 on error, 0 otherwise */ - { - byte dma_stat = inb(hwif->dma_base+2); - int rc = (dma_stat & 7) != 4; - /* from errata: stop DMA, clear INTR & ERROR */ - outb(7, hwif->dma_base); - /* clear the INTR & ERROR bits */ - outb(dma_stat|6, hwif->dma_base+2); - /* verify good DMA status */ - return rc; - } + drive->waiting_for_dma = 0; + dma_stat = inb(hwif->dma_base+2); + outb(7, hwif->dma_base); /* from errata: stop DMA, clear INTR & ERROR */ + outb(dma_stat|6, hwif->dma_base+2); /* clear the INTR & ERROR bits */ + return (dma_stat & 7) != 4; /* verify good DMA status */ case ide_dma_write: case ide_dma_read: - /* select DMA xfer */ - ns87415_prepare_drive(drive, 1); - /* use standard DMA stuff */ - if (!ide_dmaproc(func, drive)) + ns87415_prepare_drive(drive, 1); /* select DMA xfer */ + if (!ide_dmaproc(func, drive)) /* use standard DMA stuff */ return 0; - /* DMA failed: select PIO xfer */ - ns87415_prepare_drive(drive, 0); + ns87415_prepare_drive(drive, 0); /* DMA failed: select PIO xfer */ return 1; default: - /* use standard DMA stuff */ - return ide_dmaproc(func, drive); + return ide_dmaproc(func, drive); /* use standard DMA stuff */ } } @@ -100,8 +93,7 @@ __initfunc(void ide_init_ns87415 (ide_hwif_t *hwif)) { struct pci_dev *dev = hwif->pci_dev; unsigned int ctrl, using_inta; - byte progif, stat; - int timeout; + byte progif; /* * We cannot probe for IRQ: both ports share common IRQ on INTA. @@ -134,6 +126,9 @@ __initfunc(void ide_init_ns87415 (ide_hwif_t *hwif)) pci_write_config_byte(dev, 0x55, 0xee); #ifdef __sparc_v9__ +{ + int timeout; + byte stat; /* * XXX: Reset the device, if we don't it will not respond * to SELECT_DRIVE() properly during first probe_hwif(). @@ -148,6 +143,7 @@ __initfunc(void ide_init_ns87415 (ide_hwif_t *hwif)) if (stat == 0xff) break; } while ((stat & BUSY_STAT) && --timeout); +} #endif } if (!using_inta) |