// $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 5 // SUBLEVEL = 66 // EXTRAVERSION = --- 2.5/include/linux/ide.h 2003-03-25 17:49:52.000000000 +0100 +++ build-2.5/include/linux/ide.h 2003-03-30 10:04:08.000000000 +0200 @@ -1043,6 +1043,8 @@ typedef ide_startstop_t (ide_handler_t)(ide_drive_t *); typedef ide_startstop_t (ide_post_handler_t)(ide_drive_t *); typedef int (ide_expiry_t)(ide_drive_t *); +#define EXPIRY_ABORT (0) +#define EXPIRY_CALLHANDLER (-1) typedef struct hwgroup_s { /* irq handler, if active */ --- 2.5/drivers/ide/ide-io.c 2003-03-25 17:49:40.000000000 +0100 +++ build-2.5/drivers/ide/ide-io.c 2003-03-30 10:05:28.000000000 +0200 @@ -973,7 +973,7 @@ } if ((expiry = hwgroup->expiry) != NULL) { /* continue */ - if ((wait = expiry(drive)) != 0) { + if ((wait = expiry(drive)) > 0) { /* reset timer */ hwgroup->timer.expires = jiffies + wait; add_timer(&hwgroup->timer); @@ -998,7 +998,7 @@ /* local CPU only, * as if we were handling an interrupt */ local_irq_disable(); - if (hwgroup->poll_timeout != 0) { + if (hwgroup->poll_timeout != 0 || wait == EXPIRY_CALLHANDLER) { startstop = handler(drive); } else if (drive_is_ready(drive)) { if (drive->waiting_for_dma) --- 2.5/drivers/ide/ide-dma.c 2003-03-25 17:49:40.000000000 +0100 +++ build-2.5/drivers/ide/ide-dma.c 2003-03-30 10:05:54.000000000 +0200 @@ -483,9 +483,9 @@ return WAIT_CMD; if (dma_stat & 4) /* Got an Interrupt */ - HWGROUP(drive)->handler(drive); + return EXPIRY_CALLHANDLER; - return 0; + return EXPIRY_ABORT; } /**