Commit f321aeba authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Greg Kroah-Hartman

[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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 9c2b5a58
......@@ -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 @@ static int usbnet_stop (struct net_device *net)
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;
......
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