kernels/linux-2.4.0/drivers/ide/ide-dma.c
/*
 * dma_intr() is the handler for disk read/write DMA interrupts
 */
dma_intr() is the handler for disk read/write DMA interrupts
dma_intr () is the handler for disk read / write DMA interrupts
ide_startstop_t ide_dma_intr (ide_drive_t *drive)
{
	int i;
	byte stat, dma_stat;
	dma_stat = HWIF(drive)->dmaproc(ide_dma_end, drive);
	stat = GET_STAT();			
	if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
		if (!dma_stat) {
			struct request *rq = HWGROUP(drive)->rq;
			rq = HWGROUP(drive)->rq;
			for (i = rq->nr_sectors; i > 0;) {
				i -= rq->current_nr_sectors;
				ide_end_request(1, HWGROUP(drive));
			}
			return ide_stopped;
		}
		printk("%s: dma_intr: bad DMA status\n", drive->name);
	}
	return ide_error(drive, "dma_intr", stat);
}
ide_startstop_t ide_dma_intr ( ide_drive_t * drive ) { int i ; byte stat , dma_stat ; dma_stat = HWIF ( drive ) -> dmaproc ( ide_dma_end , drive ) ; stat = GET_STAT ( ) ; if ( OK_STAT ( stat , DRIVE_READY , drive -> bad_wstat | DRQ_STAT ) ) { if ( ! dma_stat ) { struct request * rq = HWGROUP ( drive ) -> rq ; rq = HWGROUP ( drive ) -> rq ; for ( i = rq -> nr_sectors ; i > 0 ; ) { i -= rq -> current_nr_sectors ; ide_end_request ( 1 , HWGROUP ( drive ) ) ; } return ide_stopped ; } printk ( " \n " , drive -> name ) ; } return ide_error ( drive , " " , stat ) ; }
dma_intr() is the handler for disk read/write DMA interrupts
dma_intr () is the handler for disk read / write DMA interrupts
/* get drive status */