[ide] icside: use ide_dma_intr()

Make ide_dma_intr() always available if CONFIG_BLK_DEV_IDEDMA=y
and use it instead of icside_dmaintr().  Acked by Russell.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent c08ec83e
......@@ -397,35 +397,6 @@ static void icside_dma_start(ide_drive_t *drive)
enable_dma(hwif->hw.dma);
}
/*
* dma_intr() is the handler for disk read/write DMA interrupts
*/
static ide_startstop_t icside_dmaintr(ide_drive_t *drive)
{
unsigned int stat;
int dma_stat;
dma_stat = icside_dma_end(drive);
stat = HWIF(drive)->INB(IDE_STATUS_REG);
if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | DRQ_STAT)) {
if (!dma_stat) {
struct request *rq = HWGROUP(drive)->rq;
int i;
for (i = rq->nr_sectors; i > 0; ) {
i -= rq->current_nr_sectors;
DRIVER(drive)->end_request(drive, 1, rq->nr_sectors);
}
return ide_stopped;
}
printk(KERN_ERR "%s: bad DMA status (dma_stat=%x)\n",
drive->name, dma_stat);
}
return ide_error(drive, __FUNCTION__, stat);
}
static int icside_dma_setup(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
......@@ -474,7 +445,7 @@ static int icside_dma_setup(ide_drive_t *drive)
static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
{
/* issue cmd to drive */
ide_execute_command(drive, cmd, icside_dmaintr, 2*WAIT_CMD, NULL);
ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD, NULL);
}
static int icside_dma_test_irq(ide_drive_t *drive)
......
......@@ -158,7 +158,6 @@ static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *d
return 0;
}
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
* ide_dma_intr - IDE DMA interrupt handler
* @drive: the drive the interrupt is for
......@@ -188,6 +187,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
EXPORT_SYMBOL_GPL(ide_dma_intr);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
* ide_build_sglist - map IDE scatter gather for DMA I/O
* @drive: the drive to build the DMA table for
......
......@@ -1441,12 +1441,12 @@ int __ide_dma_good_drive(ide_drive_t *);
int ide_use_dma(ide_drive_t *);
int __ide_dma_off(ide_drive_t *);
void ide_dma_verbose(ide_drive_t *);
ide_startstop_t ide_dma_intr(ide_drive_t *);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
extern int ide_build_sglist(ide_drive_t *, struct request *);
extern int ide_build_dmatable(ide_drive_t *, struct request *);
extern void ide_destroy_dmatable(ide_drive_t *);
extern ide_startstop_t ide_dma_intr(ide_drive_t *);
extern int ide_release_dma(ide_hwif_t *);
extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment