Commit 48546e52 authored by Ganesh Venkatesan's avatar Ganesh Venkatesan Committed by Jeff Garzik

[PATCH] e1000: Replace schedule_timeout() with

msleep()/msleep_interruptible() nacc@us.ibm.com
Signed-off-by: default avatarGanesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 56825ab3
...@@ -1566,9 +1566,7 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) ...@@ -1566,9 +1566,7 @@ e1000_phys_id(struct net_device *netdev, uint32_t data)
e1000_setup_led(&adapter->hw); e1000_setup_led(&adapter->hw);
mod_timer(&adapter->blink_timer, jiffies); mod_timer(&adapter->blink_timer, jiffies);
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(data * 1000);
schedule_timeout(data * HZ);
del_timer_sync(&adapter->blink_timer); del_timer_sync(&adapter->blink_timer);
e1000_led_off(&adapter->hw); e1000_led_off(&adapter->hw);
clear_bit(E1000_LED_ON, &adapter->led_status); clear_bit(E1000_LED_ON, &adapter->led_status);
......
...@@ -42,13 +42,8 @@ ...@@ -42,13 +42,8 @@
#include <linux/sched.h> #include <linux/sched.h>
#ifndef msec_delay #ifndef msec_delay
#define msec_delay(x) do { if(in_interrupt()) { \ #define msec_delay(x) msleep(x)
/* Don't mdelay in interrupt context! */ \
BUG(); \
} else { \
set_current_state(TASK_UNINTERRUPTIBLE); \
schedule_timeout((x * HZ)/1000 + 2); \
} } while(0)
/* Some workarounds require millisecond delays and are run during interrupt /* Some workarounds require millisecond delays and are run during interrupt
* context. Most notably, when establishing link, the phy may need tweaking * context. Most notably, when establishing link, the phy may need tweaking
* but cannot process phy register reads/writes faster than millisecond * but cannot process phy register reads/writes faster than millisecond
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment