diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-04-28 19:38:43 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-12 20:48:52 -0400 |
commit | df25e164878836196ee93d1a5757867da6eac30e (patch) | |
tree | 56a76255f8a7e30ffcba14432f408ce8b5a99917 /drivers/net/e1000 | |
parent | e4eff7291c977308989b24fdfc7215a501302e6a (diff) |
[PATCH] e1000: Fix msec-delay definition to use msleep
Fix msec-delay definition in e1000_osdep.h to use msleep
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
diff -up net-drivers-2.6/drivers/net/e1000/e1000_osdep.h net-drivers-2.6/drivers/net/e1000.new/e1000_osdep.h
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_osdep.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h index 970c656a517..2efa3b1b64d 100644 --- a/drivers/net/e1000/e1000_osdep.h +++ b/drivers/net/e1000/e1000_osdep.h @@ -42,7 +42,12 @@ #include <linux/sched.h> #ifndef msec_delay -#define msec_delay(x) msleep(x) +#define msec_delay(x) do { if(in_interrupt()) { \ + /* Don't mdelay in interrupt context! */ \ + BUG(); \ + } else { \ + msleep(x); \ + } } while(0) /* Some workarounds require millisecond delays and are run during interrupt * context. Most notably, when establishing link, the phy may need tweaking |