usb/usbnet: replace
Subsystems (2)
Quoted 5 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list.
Applys-to: 2.6.7
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays for the desired time.
Please define and use UNLINK_TIMEOUT_MS, instead.
Or better yet, switch to wait_event() ...
Quoted 7 lines
Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/usb/net/usbnet.c static int usbnet_stop (struct net_devic · line 2556
Quoted 9 lines
drivers/usb/net/usbnet.c +1
-2@@ -2550,8 +2550,7 @@ static int usbnet_stop (struct net_devicwhile (skb_queue_len (&dev->rxq) &&skb_queue_len (&dev->txq) &&skb_queue_len (&dev->done)) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (UNLINK_TIMEOUT_JIFFIES ); + msleep(jiffies_to_msecs(UNLINK_TIMEOUT_JIFFIES);devdbg (dev,"waited for %d urb completions" , temp); } dev->wait =0 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 10 lines · David Brownell
Quoted 6 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list.
Applys-to: 2.6.7
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays for the desired time.Please define and use
UNLINK_TIMEOUT_MS, instead.
Or better yet, switch towait_event()...
Please find the first of these changes below. Thanks.
drivers/usb/net/usbnet.c +3 -3
@@ -165,7 +165,8 @@// between wakeups #define UNLINK_TIMEOUT_JIFFIES ((3 /*ms*/ * HZ)/1000) - +#define UNLINK_TIMEOUT_MS 3 +/*-------------------------------------------------------------------------*/ // randomly generated ethernet address
@@ -2550,8 +2551,7 @@ static int usbnet_stop (struct net_devicwhile (skb_queue_len (&dev->rxq) &&skb_queue_len (&dev->txq) &&skb_queue_len (&dev->done)) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (UNLINK_TIMEOUT_JIFFIES ); +msleep (UNLINK_TIMEOUT_MS );devdbg (dev,"waited for %d urb completions" , temp); } dev->wait =0 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 6 lines · Nishanth Aravamudan
Quoted 5 lines · David Brownell
Quoted 4 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list.
Applys-to: 2.6.7
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays for the desired time.Please define and use
UNLINK_TIMEOUT_MS, instead.
Or better yet, switch towait_event()...Please find the first of these changes below. Thanks.
The previous patch inserted extraneous whitespace. Please find the corrected version below. Also, the unused UNLINK_TIMEOUT_JIFFIES is removed.
-Nish
Applys-to: 2.6.7
Description: Use msleep() instead of schedule_timeout() to guarantee the task delays for the desired time. Delete unused UNLINK_TIMEOUT_JIFFIES #define.
drivers/usb/net/usbnet.c +2 -3
@@ -164,7 +164,7 @@#define CONTROL_TIMEOUT_JIFFIES ((CONTROL_TIMEOUT_MS * HZ)/1000)// between wakeups -#define UNLINK_TIMEOUT_JIFFIES ((3 /*ms*/ * HZ)/1000) +#define UNLINK_TIMEOUT_MS 3/*-------------------------------------------------------------------------*/
@@ -2550,8 +2550,7 @@ static int usbnet_stop (struct net_devicwhile (skb_queue_len (&dev->rxq) &&skb_queue_len (&dev->txq) &&skb_queue_len (&dev->done)) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (UNLINK_TIMEOUT_JIFFIES ); +msleep (UNLINK_TIMEOUT_MS );devdbg (dev,"waited for %d urb completions" , temp); } dev->wait =0 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Greg KH
AppliedQuoted 21 lines · Nishanth Aravamudan
Quoted 6 lines · Nishanth Aravamudan
Quoted 5 lines · David Brownell
Quoted 4 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list.
Applys-to: 2.6.7
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays for the desired time.Please define and use
UNLINK_TIMEOUT_MS, instead.
Or better yet, switch towait_event()...Please find the first of these changes below. Thanks.
The previous patch inserted extraneous whitespace. Please find the corrected version below. Also, the unused
UNLINK_TIMEOUT_JIFFIESis removed.-Nish
Quoted 7 lines
Applys-to: 2.6.7
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays for the desired time. Delete unusedUNLINK_TIMEOUT_JIFFIES#define.Signed-off-by Nishanth Aravamudan <[email protected]>
Applied, thanks.
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors