Skip to content

Commit

Permalink
[PATCH] e1000: Fix msec-delay definition to use msleep
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Malli Chilakala authored and Jeff Garzik committed May 13, 2005
1 parent e4eff72 commit df25e16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/e1000/e1000_osdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df25e16

Please sign in to comment.