git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
net
/
apne.c
diff --git
a/drivers/net/apne.c
b/drivers/net/apne.c
index
1b49b85
..
b9820b8
100644
(file)
--- a/
drivers/net/apne.c
+++ b/
drivers/net/apne.c
@@
-36,6
+36,7
@@
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
+#include <linux/jiffies.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/io.h>
@@
-49,6
+50,8
@@
/* ---- No user-serviceable parts below ---- */
/* ---- No user-serviceable parts below ---- */
+#define DRV_NAME "apne"
+
#define NE_BASE (dev->base_addr)
#define NE_CMD 0x00
#define NE_DATAPORT 0x10 /* NatSemi-defined port window offset. */
#define NE_BASE (dev->base_addr)
#define NE_CMD 0x00
#define NE_DATAPORT 0x10 /* NatSemi-defined port window offset. */
@@
-168,7
+171,7
@@
struct net_device * __init apne_probe(int unit)
return ERR_PTR(-ENODEV);
}
return ERR_PTR(-ENODEV);
}
- if (!request_region(IOBASE, 0x20,
dev->name
)) {
+ if (!request_region(IOBASE, 0x20,
DRV_NAME
)) {
free_netdev(dev);
return ERR_PTR(-EBUSY);
}
free_netdev(dev);
return ERR_PTR(-EBUSY);
}
@@
-214,7
+217,7
@@
static int __init apne_probe1(struct net_device *dev, int ioaddr)
outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);
while ((inb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);
while ((inb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
- if (
jiffies - reset_start_time > 2*HZ/100
) {
+ if (
time_after(jiffies, reset_start_time + 2*HZ/100)
) {
printk(" not found (no reset ack).\n");
return -ENODEV;
}
printk(" not found (no reset ack).\n");
return -ENODEV;
}
@@
-310,7
+313,7
@@
static int __init apne_probe1(struct net_device *dev, int ioaddr)
dev->base_addr = ioaddr;
/* Install the Interrupt handler */
dev->base_addr = ioaddr;
/* Install the Interrupt handler */
- i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ,
dev->name
, dev);
+ i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ,
DRV_NAME
, dev);
if (i) return i;
for(i = 0; i < ETHER_ADDR_LEN; i++) {
if (i) return i;
for(i = 0; i < ETHER_ADDR_LEN; i++) {
@@
-380,7
+383,7
@@
apne_reset_8390(struct net_device *dev)
/* This check _should_not_ be necessary, omit eventually. */
while ((inb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
/* This check _should_not_ be necessary, omit eventually. */
while ((inb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
- if (
jiffies - reset_start_time > 2*HZ/100
) {
+ if (
time_after(jiffies, reset_start_time + 2*HZ/100)
) {
printk("%s: ne_reset_8390() did not complete.\n", dev->name);
break;
}
printk("%s: ne_reset_8390() did not complete.\n", dev->name);
break;
}
@@
-528,7
+531,7
@@
apne_block_output(struct net_device *dev, int count,
dma_start = jiffies;
while ((inb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
dma_start = jiffies;
while ((inb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
- if (
jiffies - dma_start > 2*HZ/100) {
/* 20ms */
+ if (
time_after(jiffies, dma_start + 2*HZ/100)) {
/* 20ms */
printk("%s: timeout waiting for Tx RDC.\n", dev->name);
apne_reset_8390(dev);
NS8390_init(dev,1);
printk("%s: timeout waiting for Tx RDC.\n", dev->name);
apne_reset_8390(dev);
NS8390_init(dev,1);