ChangeSet 1.1807.48.24, 2004/08/02 14:29:51-07:00, [EMAIL PROTECTED]

[PATCH] USB: usbnet: replace schedule_timeout() with msleep()

Use msleep() instead of schedule_timeout() to guarantee the task delays
for the desired time. Delete unused UNLINK_TIMEOUT_JIFFIES #define.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/net/usbnet.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c  2004-08-23 13:20:02 -07:00
+++ b/drivers/usb/net/usbnet.c  2004-08-23 13:20:02 -07:00
@@ -166,7 +166,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
 
 /*-------------------------------------------------------------------------*/
 
@@ -2591,8 +2591,7 @@
        while (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 = NULL;



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to