net/e1000_ethtool: replace
Subsystems (2)
PATCH 1/1 net/e1000_ethtool: replace
I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);schedule_timeout(some_time);
with
msleep(jiffies_to_msecs(some_time));
msleep() is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.
Thanks,
Nish
Applys-to: 2.6.7
Description: Replace schedule_timeout() with msleep() to guarantee the task delays for the desired time.
drivers/net/e1000/e1000_ethtool.c +1 -3
@@ -1532,9 +1532,7 @@ e1000_phys_id(struct net_device *netdev,e1000_setup_led (&adapter->hw);mod_timer (&adapter->blink_timer, jiffies); -set_current_state (TASK_INTERRUPTIBLE ); - -schedule_timeout (data *HZ ); +msleep (data *1000 );del_timer_sync (&adapter->blink_timer);e1000_led_off (&adapter->hw);clear_bit (E1000_LED_ON , &adapter->led_status);
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 15 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);schedule_timeout(some_time);with
msleep(jiffies_to_msecs(some_time));
msleep()is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.
drivers/net/e1000/e1000_ethtool.c e1000_phys_id(struct net_device *netdev, · line 1536
Quoted 5 lines
drivers/net/e1000/e1000_ethtool.c +1
-3-set_current_state (TASK_INTERRUPTIBLE ); - -schedule_timeout (data *HZ ); +msleep (data *1000 );del_timer_sync (&adapter->blink_timer);
No, this needs to be interruptible.
Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors