diff options
Diffstat (limited to 'drivers/net/ne2.c')
-rw-r--r-- | drivers/net/ne2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c index e6df375a1d4b..2aa7b77f84f8 100644 --- a/drivers/net/ne2.c +++ b/drivers/net/ne2.c | |||
@@ -75,6 +75,7 @@ static const char *version = "ne2.c:v0.91 Nov 16 1998 Wim Dumon <wimpie@kotnet.o | |||
75 | #include <linux/etherdevice.h> | 75 | #include <linux/etherdevice.h> |
76 | #include <linux/skbuff.h> | 76 | #include <linux/skbuff.h> |
77 | #include <linux/bitops.h> | 77 | #include <linux/bitops.h> |
78 | #include <linux/jiffies.h> | ||
78 | 79 | ||
79 | #include <asm/system.h> | 80 | #include <asm/system.h> |
80 | #include <asm/io.h> | 81 | #include <asm/io.h> |
@@ -395,7 +396,7 @@ static int __init ne2_probe1(struct net_device *dev, int slot) | |||
395 | outb(inb(base_addr + NE_RESET), base_addr + NE_RESET); | 396 | outb(inb(base_addr + NE_RESET), base_addr + NE_RESET); |
396 | 397 | ||
397 | while ((inb_p(base_addr + EN0_ISR) & ENISR_RESET) == 0) | 398 | while ((inb_p(base_addr + EN0_ISR) & ENISR_RESET) == 0) |
398 | if (jiffies - reset_start_time > 2*HZ/100) { | 399 | if (time_after(jiffies, reset_start_time + 2*HZ/100)) { |
399 | printk(" not found (no reset ack).\n"); | 400 | printk(" not found (no reset ack).\n"); |
400 | retval = -ENODEV; | 401 | retval = -ENODEV; |
401 | goto out; | 402 | goto out; |
@@ -548,7 +549,7 @@ static void ne_reset_8390(struct net_device *dev) | |||
548 | 549 | ||
549 | /* This check _should_not_ be necessary, omit eventually. */ | 550 | /* This check _should_not_ be necessary, omit eventually. */ |
550 | while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0) | 551 | while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0) |
551 | if (jiffies - reset_start_time > 2*HZ/100) { | 552 | if (time_after(jiffies, reset_start_time + 2*HZ/100)) { |
552 | printk("%s: ne_reset_8390() did not complete.\n", | 553 | printk("%s: ne_reset_8390() did not complete.\n", |
553 | dev->name); | 554 | dev->name); |
554 | break; | 555 | break; |
@@ -749,7 +750,7 @@ retry: | |||
749 | #endif | 750 | #endif |
750 | 751 | ||
751 | while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) | 752 | while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) |
752 | if (jiffies - dma_start > 2*HZ/100) { /* 20ms */ | 753 | if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */ |
753 | printk("%s: timeout waiting for Tx RDC.\n", dev->name); | 754 | printk("%s: timeout waiting for Tx RDC.\n", dev->name); |
754 | ne_reset_8390(dev); | 755 | ne_reset_8390(dev); |
755 | NS8390_init(dev,1); | 756 | NS8390_init(dev,1); |