patch-2.1.132 linux/drivers/net/ltpc.c

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

diff -u --recursive --new-file v2.1.131/linux/drivers/net/ltpc.c linux/drivers/net/ltpc.c
@@ -1059,14 +1059,14 @@
 
 	inb_p(io+1);
 	inb_p(io+0);
-	timeout = jiffies+100;
-	while(timeout>jiffies) {
+	timeout = jiffies+100*HZ/100;
+	while(time_before(jiffies, timeout)) {
 		if ( 0xfa == inb_p(io+6) ) break;
 	}
 
 	inb_p(io+3);
 	inb_p(io+2);
-	while(timeout>jiffies) {
+	while(time_before(jiffies, timeout)) {
 		if ( 0xfb == inb_p(io+6) ) break;
 	}
 
@@ -1161,8 +1161,8 @@
 
 	inb_p(io+1);
 	inb_p(io+3);
-	timeout = jiffies+2;
-	while(timeout>jiffies) ; /* hold it in reset for a coupla jiffies */
+	timeout = jiffies+2*HZ/100;
+	while(time_before(jiffies, timeout)) ; /* hold it in reset for a coupla jiffies */
 	inb_p(io+0);
 	inb_p(io+2);
 	inb_p(io+7); /* clear reset */
@@ -1171,9 +1171,9 @@
 	inb_p(io+5); /* enable dma */
 	inb_p(io+6); /* tri-state interrupt line */
 
-	timeout = jiffies+100;
+	timeout = jiffies+100*HZ/100;
 	
-	while(timeout>jiffies) {
+	while(time_before(jiffies, timeout)) {
 		/* wait for the card to complete initialization */
 	}
  
@@ -1220,8 +1220,8 @@
 
 	(void) inb_p(io+3);
 	(void) inb_p(io+2);
-	timeout = jiffies+100;
-	while(timeout>jiffies) {
+	timeout = jiffies+100*HZ/100;
+	while(time_before(jiffies, timeout)) {
 		if( 0xf9 == inb_p(io+6)) break;
 	}
 

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