diff -u -ruN linux-2.4.20.orig/drivers/ide/Config.in celinux-040213/drivers/ide/Config.in --- linux-2.4.20.orig/drivers/ide/Config.in Thu Nov 28 23:53:13 2002 +++ celinux-040213/drivers/ide/Config.in Thu Feb 12 10:25:12 2004 @@ -36,6 +36,8 @@ bool ' IDE Taskfile Access' CONFIG_IDE_TASK_IOCTL # bool ' IDE Taskfile IO' CONFIG_IDE_TASKFILE_IO + dep_bool ' Preemptible IDE delays' CONFIG_IDE_PREEMPT $CONFIG_INSTANT_ON + comment 'IDE chipset support/bugfixes' if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then dep_bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86 diff -u -ruN linux-2.4.20.orig/drivers/ide/ide.c celinux-040213/drivers/ide/ide.c --- linux-2.4.20.orig/drivers/ide/ide.c Thu Nov 28 23:53:13 2002 +++ celinux-040213/drivers/ide/ide.c Thu Feb 12 10:25:12 2004 @@ -2739,12 +2776,17 @@ */ void ide_delay_50ms (void) { +#ifdef CONFIG_IDE_PREEMPT + __set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1+HZ/20); /* from 2.5 */ +#else /* CONFIG_IDE_PREEMPT */ #ifndef CONFIG_BLK_DEV_IDECS mdelay(50); #else __set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ/20); #endif /* CONFIG_BLK_DEV_IDECS */ +#endif /* CONFIG_IDE_PREEMPT */ } int system_bus_clock (void)