patch-2.4.21 linux-2.4.21/drivers/char/i810_rng.c
Next file: linux-2.4.21/drivers/char/ipmi/Makefile
Previous file: linux-2.4.21/drivers/char/genrtc.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
2003-06-13 07:51:33.000000000 -0700
- Orig file:
linux-2.4.20/drivers/char/i810_rng.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.20/drivers/char/i810_rng.c linux-2.4.21/drivers/char/i810_rng.c
@@ -1,7 +1,7 @@
/*
Hardware driver for Intel i810 Random Number Generator (RNG)
- Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+ Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
Driver Web site: http://sourceforge.net/projects/gkernel/
@@ -27,6 +27,7 @@
#include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <linux/mm.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -243,8 +244,13 @@
if (filp->f_flags & O_NONBLOCK)
return ret ? : -EAGAIN;
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
+ if (current->need_resched)
+ {
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(1);
+ }
+ else
+ udelay(200);
if (signal_pending (current))
return ret ? : -ERESTARTSYS;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)