summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDave Jones <davej@suse.de>2002-04-28 04:55:06 -0700
committerJaroslav Kysela <perex@suse.cz>2002-04-28 04:55:06 -0700
commite149ee4cd47df77b270c529433d4a66ab00a9f57 (patch)
tree279428a5c60f5dad012c407c1cb8014b72c43d41 /drivers/net
parent2617765b2b5dab1a448a8a56629d16c345bcbf6e (diff)
[PATCH] Jiffies wrap fixes.
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fc/iph5526.c5
-rw-r--r--drivers/net/rrunner.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/fc/iph5526.c b/drivers/net/fc/iph5526.c
index c6a8663a3e76..0819ccc93818 100644
--- a/drivers/net/fc/iph5526.c
+++ b/drivers/net/fc/iph5526.c
@@ -3870,8 +3870,11 @@ struct pci_dev *pdev = NULL;
/* Wait for the Link to come up and the login process
* to complete.
*/
- for(timeout = jiffies + 10*HZ; (timeout > jiffies) && ((fi->g.link_up == FALSE) || (fi->g.port_discovery == TRUE) || (fi->g.explore_fabric == TRUE) || (fi->g.perform_adisc == TRUE));)
+ for(timeout = jiffies + 10*HZ; time_before(jiffies, timeout) && ((fi->g.link_up == FALSE) || (fi->g.port_discovery == TRUE) || (fi->g.explore_fabric == TRUE) || (fi->g.perform_adisc == TRUE));)
+ {
+ cpu_relax();
barrier();
+ }
count++;
no_of_hosts++;
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index a42abd30addd..9607f2573e9b 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -773,7 +773,7 @@ static int rr_init1(struct net_device *dev)
* Give the FirmWare time to chew on the `get running' command.
*/
myjif = jiffies + 5 * HZ;
- while ((jiffies < myjif) && !rrpriv->fw_running);
+ while (time_before(jiffies, myjif) && !rrpriv->fw_running);
netif_start_queue(dev);