diff -u dist-2.4.3/drivers/ide/hpt366.c linux-2.4/drivers/ide/hpt366.c --- dist-2.4.3/drivers/ide/hpt366.c Sat Jan 27 08:45:58 2001 +++ linux-2.4/drivers/ide/hpt366.c Thu Apr 26 20:15:17 2001 @@ -523,9 +638,11 @@ void hpt370_rw_proc (ide_drive_t *drive, ide_dma_action_t func) { - if ((func != ide_dma_write) || (func != ide_dma_read)) + if ((func != ide_dma_write && func != ide_dma_read) + || drive->rwproc_cache == (void *)func) return; hpt370_tune_chipset(drive, drive->current_speed, (func == ide_dma_write)); + drive->rwproc_cache = (void *)func; } static int config_drive_xfer_rate (ide_drive_t *drive) diff -u dist-2.4.3/include/linux/ide.h linux-2.4/include/linux/ide.h --- dist-2.4.3/include/linux/ide.h Mon Jan 29 23:25:32 2001 +++ linux-2.4/include/linux/ide.h Thu Apr 26 20:16:00 2001 @@ -284,6 +284,7 @@ unsigned long service_time; /* service time of last request */ unsigned long timeout; /* max time to wait for irq */ special_t special; /* special action flags */ + void *rwproc_cache; /* last rwproc update */ byte keep_settings; /* restore settings after drive reset */ byte using_dma; /* disk is using dma for read/write */ byte waiting_for_dma; /* dma currently in progress */