patch-2.2.0-pre2 linux/drivers/net/sktr.c

Next file: linux/drivers/net/tulip.c
Previous file: linux/drivers/net/seeq8005.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre1/linux/drivers/net/sktr.c linux/drivers/net/sktr.c
@@ -1020,7 +1020,7 @@
 		return;
 
 	sktr_chk_outstanding_cmds(dev);
-	if(tp->LastSendTime + SEND_TIMEOUT < jiffies
+	if(time_before(tp->LastSendTime + SEND_TIMEOUT, jiffies)
 		&& (tp->QueueSkb < MAX_TX_QUEUE || tp->TplFree != tp->TplBusy))
 	{
 		/* Anything to send, but stalled to long */
@@ -1526,11 +1526,11 @@
 {
 	long tmp;
 
-	tmp = time/(1000000/HZ);
+	tmp = jiffies + time/(1000000/HZ);
 	do {
-		current->state 		= TASK_INTERRUPTIBLE;
+  		current->state 		= TASK_INTERRUPTIBLE;
 		tmp = schedule_timeout(tmp);
-	} while(tmp);
+	} while(time_after(tmp, jiffies));
 
 	return;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov