diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-22 19:33:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-22 19:33:00 -0400 |
commit | 38afd6adf6bccd7176e88c07cac104d3639aa30d (patch) | |
tree | 2142409984b609e51ef60b6a14318dd4e878718a /drivers | |
parent | 8ed1383fb7b6685968588141d5934e0e6715e954 (diff) | |
parent | 261688d01ec07d3a265b8ace6ec68310fbd96a96 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/ambassador.c | 4 | ||||
-rw-r--r-- | drivers/atm/firestream.c | 6 | ||||
-rw-r--r-- | drivers/atm/he.c | 1 | ||||
-rw-r--r-- | drivers/atm/idt77252.c | 3 | ||||
-rw-r--r-- | drivers/atm/zatm.c | 107 | ||||
-rw-r--r-- | drivers/atm/zatm.h | 1 | ||||
-rw-r--r-- | drivers/net/Kconfig | 18 | ||||
-rw-r--r-- | drivers/net/eql.c | 16 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/sdla_fr.c | 7 | ||||
-rw-r--r-- | drivers/net/wan/sdla_ft1.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/sdla_ppp.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/sdla_x25.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/wanpipe_multppp.c | 9 | ||||
-rw-r--r-- | drivers/usb/atm/speedtch.c | 12 |
15 files changed, 119 insertions, 77 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index c46d9520c5a7..73c6b85299c1 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -794,7 +794,9 @@ static void drain_rx_pools (amb_dev * dev) { | |||
794 | drain_rx_pool (dev, pool); | 794 | drain_rx_pool (dev, pool); |
795 | } | 795 | } |
796 | 796 | ||
797 | static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) { | 797 | static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, |
798 | unsigned int __nocast priority) | ||
799 | { | ||
798 | rx_in rx; | 800 | rx_in rx; |
799 | amb_rxq * rxq; | 801 | amb_rxq * rxq; |
800 | 802 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 101f0cc33d10..b078fa548ebf 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -1374,7 +1374,8 @@ static void reset_chip (struct fs_dev *dev) | |||
1374 | } | 1374 | } |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | static void __devinit *aligned_kmalloc (int size, int flags, int alignment) | 1377 | static void __devinit *aligned_kmalloc (int size, unsigned int __nocast flags, |
1378 | int alignment) | ||
1378 | { | 1379 | { |
1379 | void *t; | 1380 | void *t; |
1380 | 1381 | ||
@@ -1464,7 +1465,8 @@ static inline int nr_buffers_in_freepool (struct fs_dev *dev, struct freepool *f | |||
1464 | does. I've seen "receive abort: no buffers" and things started | 1465 | does. I've seen "receive abort: no buffers" and things started |
1465 | working again after that... -- REW */ | 1466 | working again after that... -- REW */ |
1466 | 1467 | ||
1467 | static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags) | 1468 | static void top_off_fp (struct fs_dev *dev, struct freepool *fp, |
1469 | unsigned int __nocast gfp_flags) | ||
1468 | { | 1470 | { |
1469 | struct FS_BPENTRY *qe, *ne; | 1471 | struct FS_BPENTRY *qe, *ne; |
1470 | struct sk_buff *skb; | 1472 | struct sk_buff *skb; |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index df2c83fd5496..28250c9b32d6 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -57,7 +57,6 @@ | |||
57 | 57 | ||
58 | #include <linux/config.h> | 58 | #include <linux/config.h> |
59 | #include <linux/module.h> | 59 | #include <linux/module.h> |
60 | #include <linux/version.h> | ||
61 | #include <linux/kernel.h> | 60 | #include <linux/kernel.h> |
62 | #include <linux/skbuff.h> | 61 | #include <linux/skbuff.h> |
63 | #include <linux/pci.h> | 62 | #include <linux/pci.h> |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index baaf1a3d2242..30b7e990ed0b 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -46,6 +46,7 @@ static char const rcsid[] = | |||
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/bitops.h> | 47 | #include <linux/bitops.h> |
48 | #include <linux/wait.h> | 48 | #include <linux/wait.h> |
49 | #include <linux/jiffies.h> | ||
49 | #include <asm/semaphore.h> | 50 | #include <asm/semaphore.h> |
50 | #include <asm/io.h> | 51 | #include <asm/io.h> |
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
@@ -780,7 +781,7 @@ push_on_scq(struct idt77252_dev *card, struct vc_map *vc, struct sk_buff *skb) | |||
780 | return 0; | 781 | return 0; |
781 | 782 | ||
782 | out: | 783 | out: |
783 | if (jiffies - scq->trans_start > HZ) { | 784 | if (time_after(jiffies, scq->trans_start + HZ)) { |
784 | printk("%s: Error pushing TBD for %d.%d\n", | 785 | printk("%s: Error pushing TBD for %d.%d\n", |
785 | card->name, vc->tx_vcc->vpi, vc->tx_vcc->vci); | 786 | card->name, vc->tx_vcc->vpi, vc->tx_vcc->vci); |
786 | #ifdef CONFIG_ATM_IDT77252_DEBUG | 787 | #ifdef CONFIG_ATM_IDT77252_DEBUG |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 8d5e65cb9755..a2b236a966e0 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -16,9 +16,9 @@ | |||
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/ioport.h> /* for request_region */ | ||
20 | #include <linux/uio.h> | 19 | #include <linux/uio.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/dma-mapping.h> | ||
22 | #include <linux/atm_zatm.h> | 22 | #include <linux/atm_zatm.h> |
23 | #include <linux/capability.h> | 23 | #include <linux/capability.h> |
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
@@ -1257,22 +1257,22 @@ static int __init zatm_init(struct atm_dev *dev) | |||
1257 | 1257 | ||
1258 | static int __init zatm_start(struct atm_dev *dev) | 1258 | static int __init zatm_start(struct atm_dev *dev) |
1259 | { | 1259 | { |
1260 | struct zatm_dev *zatm_dev; | 1260 | struct zatm_dev *zatm_dev = ZATM_DEV(dev); |
1261 | struct pci_dev *pdev = zatm_dev->pci_dev; | ||
1261 | unsigned long curr; | 1262 | unsigned long curr; |
1262 | int pools,vccs,rx; | 1263 | int pools,vccs,rx; |
1263 | int error,i,ld; | 1264 | int error, i, ld; |
1264 | 1265 | ||
1265 | DPRINTK("zatm_start\n"); | 1266 | DPRINTK("zatm_start\n"); |
1266 | zatm_dev = ZATM_DEV(dev); | ||
1267 | zatm_dev->rx_map = zatm_dev->tx_map = NULL; | 1267 | zatm_dev->rx_map = zatm_dev->tx_map = NULL; |
1268 | for (i = 0; i < NR_MBX; i++) | 1268 | for (i = 0; i < NR_MBX; i++) |
1269 | zatm_dev->mbx_start[i] = 0; | 1269 | zatm_dev->mbx_start[i] = 0; |
1270 | if (request_irq(zatm_dev->irq,&zatm_int,SA_SHIRQ,DEV_LABEL,dev)) { | 1270 | error = request_irq(zatm_dev->irq, zatm_int, SA_SHIRQ, DEV_LABEL, dev); |
1271 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", | 1271 | if (error < 0) { |
1272 | dev->number,zatm_dev->irq); | 1272 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", |
1273 | return -EAGAIN; | 1273 | dev->number,zatm_dev->irq); |
1274 | goto done; | ||
1274 | } | 1275 | } |
1275 | request_region(zatm_dev->base,uPD98401_PORTS,DEV_LABEL); | ||
1276 | /* define memory regions */ | 1276 | /* define memory regions */ |
1277 | pools = NR_POOLS; | 1277 | pools = NR_POOLS; |
1278 | if (NR_SHAPERS*SHAPER_SIZE > pools*POOL_SIZE) | 1278 | if (NR_SHAPERS*SHAPER_SIZE > pools*POOL_SIZE) |
@@ -1299,51 +1299,66 @@ static int __init zatm_start(struct atm_dev *dev) | |||
1299 | "%ld VCs\n",dev->number,NR_SHAPERS,pools,rx, | 1299 | "%ld VCs\n",dev->number,NR_SHAPERS,pools,rx, |
1300 | (zatm_dev->mem-curr*4)/VC_SIZE); | 1300 | (zatm_dev->mem-curr*4)/VC_SIZE); |
1301 | /* create mailboxes */ | 1301 | /* create mailboxes */ |
1302 | for (i = 0; i < NR_MBX; i++) | 1302 | for (i = 0; i < NR_MBX; i++) { |
1303 | if (mbx_entries[i]) { | 1303 | void *mbx; |
1304 | unsigned long here; | 1304 | dma_addr_t mbx_dma; |
1305 | 1305 | ||
1306 | here = (unsigned long) kmalloc(2*MBX_SIZE(i), | 1306 | if (!mbx_entries[i]) |
1307 | GFP_KERNEL); | 1307 | continue; |
1308 | if (!here) { | 1308 | mbx = pci_alloc_consistent(pdev, 2*MBX_SIZE(i), &mbx_dma); |
1309 | error = -ENOMEM; | 1309 | if (!mbx) { |
1310 | goto out; | 1310 | error = -ENOMEM; |
1311 | } | 1311 | goto out; |
1312 | if ((here^(here+MBX_SIZE(i))) & ~0xffffUL)/* paranoia */ | ||
1313 | here = (here & ~0xffffUL)+0x10000; | ||
1314 | zatm_dev->mbx_start[i] = here; | ||
1315 | if ((here^virt_to_bus((void *) here)) & 0xffff) { | ||
1316 | printk(KERN_ERR DEV_LABEL "(itf %d): system " | ||
1317 | "bus incompatible with driver\n", | ||
1318 | dev->number); | ||
1319 | error = -ENODEV; | ||
1320 | goto out; | ||
1321 | } | ||
1322 | DPRINTK("mbx@0x%08lx-0x%08lx\n",here,here+MBX_SIZE(i)); | ||
1323 | zatm_dev->mbx_end[i] = (here+MBX_SIZE(i)) & 0xffff; | ||
1324 | zout(virt_to_bus((void *) here) >> 16,MSH(i)); | ||
1325 | zout(virt_to_bus((void *) here),MSL(i)); | ||
1326 | zout((here+MBX_SIZE(i)) & 0xffff,MBA(i)); | ||
1327 | zout(here & 0xffff,MTA(i)); | ||
1328 | zout(here & 0xffff,MWA(i)); | ||
1329 | } | 1312 | } |
1313 | /* | ||
1314 | * Alignment provided by pci_alloc_consistent() isn't enough | ||
1315 | * for this device. | ||
1316 | */ | ||
1317 | if (((unsigned long)mbx ^ mbx_dma) & 0xffff) { | ||
1318 | printk(KERN_ERR DEV_LABEL "(itf %d): system " | ||
1319 | "bus incompatible with driver\n", dev->number); | ||
1320 | pci_free_consistent(pdev, 2*MBX_SIZE(i), mbx, mbx_dma); | ||
1321 | error = -ENODEV; | ||
1322 | goto out; | ||
1323 | } | ||
1324 | DPRINTK("mbx@0x%08lx-0x%08lx\n", mbx, mbx + MBX_SIZE(i)); | ||
1325 | zatm_dev->mbx_start[i] = (unsigned long)mbx; | ||
1326 | zatm_dev->mbx_dma[i] = mbx_dma; | ||
1327 | zatm_dev->mbx_end[i] = (zatm_dev->mbx_start[i] + MBX_SIZE(i)) & | ||
1328 | 0xffff; | ||
1329 | zout(mbx_dma >> 16, MSH(i)); | ||
1330 | zout(mbx_dma, MSL(i)); | ||
1331 | zout(zatm_dev->mbx_end[i], MBA(i)); | ||
1332 | zout((unsigned long)mbx & 0xffff, MTA(i)); | ||
1333 | zout((unsigned long)mbx & 0xffff, MWA(i)); | ||
1334 | } | ||
1330 | error = start_tx(dev); | 1335 | error = start_tx(dev); |
1331 | if (error) goto out; | 1336 | if (error) |
1337 | goto out; | ||
1332 | error = start_rx(dev); | 1338 | error = start_rx(dev); |
1333 | if (error) goto out; | 1339 | if (error) |
1340 | goto out_tx; | ||
1334 | error = dev->phy->start(dev); | 1341 | error = dev->phy->start(dev); |
1335 | if (error) goto out; | 1342 | if (error) |
1343 | goto out_rx; | ||
1336 | zout(0xffffffff,IMR); /* enable interrupts */ | 1344 | zout(0xffffffff,IMR); /* enable interrupts */ |
1337 | /* enable TX & RX */ | 1345 | /* enable TX & RX */ |
1338 | zout(zin(GMR) | uPD98401_GMR_SE | uPD98401_GMR_RE,GMR); | 1346 | zout(zin(GMR) | uPD98401_GMR_SE | uPD98401_GMR_RE,GMR); |
1339 | return 0; | 1347 | done: |
1340 | out: | 1348 | return error; |
1341 | for (i = 0; i < NR_MBX; i++) | 1349 | |
1342 | kfree(zatm_dev->mbx_start[i]); | 1350 | out_rx: |
1343 | kfree(zatm_dev->rx_map); | 1351 | kfree(zatm_dev->rx_map); |
1352 | out_tx: | ||
1344 | kfree(zatm_dev->tx_map); | 1353 | kfree(zatm_dev->tx_map); |
1354 | out: | ||
1355 | while (i-- > 0) { | ||
1356 | pci_free_consistent(pdev, 2*MBX_SIZE(i), | ||
1357 | (void *)zatm_dev->mbx_start[i], | ||
1358 | zatm_dev->mbx_dma[i]); | ||
1359 | } | ||
1345 | free_irq(zatm_dev->irq, dev); | 1360 | free_irq(zatm_dev->irq, dev); |
1346 | return error; | 1361 | goto done; |
1347 | } | 1362 | } |
1348 | 1363 | ||
1349 | 1364 | ||
diff --git a/drivers/atm/zatm.h b/drivers/atm/zatm.h index 34a0480f63d6..416fe0fda60c 100644 --- a/drivers/atm/zatm.h +++ b/drivers/atm/zatm.h | |||
@@ -73,6 +73,7 @@ struct zatm_dev { | |||
73 | int chans; /* map size, must be 2^n */ | 73 | int chans; /* map size, must be 2^n */ |
74 | /*-------------------------------- mailboxes */ | 74 | /*-------------------------------- mailboxes */ |
75 | unsigned long mbx_start[NR_MBX];/* start addresses */ | 75 | unsigned long mbx_start[NR_MBX];/* start addresses */ |
76 | dma_addr_t mbx_dma[NR_MBX]; | ||
76 | u16 mbx_end[NR_MBX]; /* end offset (in bytes) */ | 77 | u16 mbx_end[NR_MBX]; /* end offset (in bytes) */ |
77 | /*-------------------------------- other pointers */ | 78 | /*-------------------------------- other pointers */ |
78 | u32 pool_base; /* Free buffer pool dsc (word addr) */ | 79 | u32 pool_base; /* Free buffer pool dsc (word addr) */ |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9a07ff7a7777..534b598866b3 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2544,9 +2544,25 @@ config SHAPER | |||
2544 | 2544 | ||
2545 | config NETCONSOLE | 2545 | config NETCONSOLE |
2546 | tristate "Network console logging support (EXPERIMENTAL)" | 2546 | tristate "Network console logging support (EXPERIMENTAL)" |
2547 | depends on NETDEVICES && EXPERIMENTAL | 2547 | depends on NETDEVICES && INET && EXPERIMENTAL |
2548 | ---help--- | 2548 | ---help--- |
2549 | If you want to log kernel messages over the network, enable this. | 2549 | If you want to log kernel messages over the network, enable this. |
2550 | See <file:Documentation/networking/netconsole.txt> for details. | 2550 | See <file:Documentation/networking/netconsole.txt> for details. |
2551 | 2551 | ||
2552 | config NETPOLL | ||
2553 | def_bool NETCONSOLE | ||
2554 | |||
2555 | config NETPOLL_RX | ||
2556 | bool "Netpoll support for trapping incoming packets" | ||
2557 | default n | ||
2558 | depends on NETPOLL | ||
2559 | |||
2560 | config NETPOLL_TRAP | ||
2561 | bool "Netpoll traffic trapping" | ||
2562 | default n | ||
2563 | depends on NETPOLL | ||
2564 | |||
2565 | config NET_POLL_CONTROLLER | ||
2566 | def_bool NETPOLL | ||
2567 | |||
2552 | endmenu | 2568 | endmenu |
diff --git a/drivers/net/eql.c b/drivers/net/eql.c index dd6865820372..aa1569182fd6 100644 --- a/drivers/net/eql.c +++ b/drivers/net/eql.c | |||
@@ -132,7 +132,7 @@ static struct net_device_stats *eql_get_stats(struct net_device *dev); | |||
132 | #define eql_is_slave(dev) ((dev->flags & IFF_SLAVE) == IFF_SLAVE) | 132 | #define eql_is_slave(dev) ((dev->flags & IFF_SLAVE) == IFF_SLAVE) |
133 | #define eql_is_master(dev) ((dev->flags & IFF_MASTER) == IFF_MASTER) | 133 | #define eql_is_master(dev) ((dev->flags & IFF_MASTER) == IFF_MASTER) |
134 | 134 | ||
135 | static void eql_kill_one_slave(slave_t *slave); | 135 | static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave); |
136 | 136 | ||
137 | static void eql_timer(unsigned long param) | 137 | static void eql_timer(unsigned long param) |
138 | { | 138 | { |
@@ -149,7 +149,7 @@ static void eql_timer(unsigned long param) | |||
149 | if (slave->bytes_queued < 0) | 149 | if (slave->bytes_queued < 0) |
150 | slave->bytes_queued = 0; | 150 | slave->bytes_queued = 0; |
151 | } else { | 151 | } else { |
152 | eql_kill_one_slave(slave); | 152 | eql_kill_one_slave(&eql->queue, slave); |
153 | } | 153 | } |
154 | 154 | ||
155 | } | 155 | } |
@@ -214,9 +214,10 @@ static int eql_open(struct net_device *dev) | |||
214 | return 0; | 214 | return 0; |
215 | } | 215 | } |
216 | 216 | ||
217 | static void eql_kill_one_slave(slave_t *slave) | 217 | static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave) |
218 | { | 218 | { |
219 | list_del(&slave->list); | 219 | list_del(&slave->list); |
220 | queue->num_slaves--; | ||
220 | slave->dev->flags &= ~IFF_SLAVE; | 221 | slave->dev->flags &= ~IFF_SLAVE; |
221 | dev_put(slave->dev); | 222 | dev_put(slave->dev); |
222 | kfree(slave); | 223 | kfree(slave); |
@@ -232,8 +233,7 @@ static void eql_kill_slave_queue(slave_queue_t *queue) | |||
232 | list_for_each_safe(this, tmp, head) { | 233 | list_for_each_safe(this, tmp, head) { |
233 | slave_t *s = list_entry(this, slave_t, list); | 234 | slave_t *s = list_entry(this, slave_t, list); |
234 | 235 | ||
235 | eql_kill_one_slave(s); | 236 | eql_kill_one_slave(queue, s); |
236 | queue->num_slaves--; | ||
237 | } | 237 | } |
238 | 238 | ||
239 | spin_unlock_bh(&queue->lock); | 239 | spin_unlock_bh(&queue->lock); |
@@ -318,7 +318,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue) | |||
318 | } | 318 | } |
319 | } else { | 319 | } else { |
320 | /* We found a dead slave, kill it. */ | 320 | /* We found a dead slave, kill it. */ |
321 | eql_kill_one_slave(slave); | 321 | eql_kill_one_slave(queue, slave); |
322 | } | 322 | } |
323 | } | 323 | } |
324 | return best_slave; | 324 | return best_slave; |
@@ -393,7 +393,7 @@ static int __eql_insert_slave(slave_queue_t *queue, slave_t *slave) | |||
393 | 393 | ||
394 | duplicate_slave = __eql_find_slave_dev(queue, slave->dev); | 394 | duplicate_slave = __eql_find_slave_dev(queue, slave->dev); |
395 | if (duplicate_slave != 0) | 395 | if (duplicate_slave != 0) |
396 | eql_kill_one_slave(duplicate_slave); | 396 | eql_kill_one_slave(queue, duplicate_slave); |
397 | 397 | ||
398 | list_add(&slave->list, &queue->all_slaves); | 398 | list_add(&slave->list, &queue->all_slaves); |
399 | queue->num_slaves++; | 399 | queue->num_slaves++; |
@@ -471,7 +471,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use | |||
471 | slave_dev); | 471 | slave_dev); |
472 | 472 | ||
473 | if (slave) { | 473 | if (slave) { |
474 | eql_kill_one_slave(slave); | 474 | eql_kill_one_slave(&eql->queue, slave); |
475 | ret = 0; | 475 | ret = 0; |
476 | } | 476 | } |
477 | } | 477 | } |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index fbc2f58ff688..0d8bb4cccbb7 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/ioport.h> | 41 | #include <linux/ioport.h> |
42 | #include <linux/ethtool.h> | 42 | #include <linux/ethtool.h> |
43 | #include <linux/mii.h> | 43 | #include <linux/mii.h> |
44 | #include <linux/jiffies.h> | ||
44 | 45 | ||
45 | #include <pcmcia/cs_types.h> | 46 | #include <pcmcia/cs_types.h> |
46 | #include <pcmcia/cs.h> | 47 | #include <pcmcia/cs.h> |
@@ -2092,7 +2093,7 @@ static void media_check(u_long arg) | |||
2092 | } | 2093 | } |
2093 | 2094 | ||
2094 | /* Ignore collisions unless we've had no rx's recently */ | 2095 | /* Ignore collisions unless we've had no rx's recently */ |
2095 | if (jiffies - dev->last_rx > HZ) { | 2096 | if (time_after(jiffies, dev->last_rx + HZ)) { |
2096 | if (smc->tx_err || (smc->media_status & EPH_16COL)) | 2097 | if (smc->tx_err || (smc->media_status & EPH_16COL)) |
2097 | media |= EPH_16COL; | 2098 | media |= EPH_16COL; |
2098 | } | 2099 | } |
diff --git a/drivers/net/wan/sdla_fr.c b/drivers/net/wan/sdla_fr.c index 2efccb0554c0..c5f5e62aab8b 100644 --- a/drivers/net/wan/sdla_fr.c +++ b/drivers/net/wan/sdla_fr.c | |||
@@ -152,6 +152,7 @@ | |||
152 | #include <asm/io.h> /* for inb(), outb(), etc. */ | 152 | #include <asm/io.h> /* for inb(), outb(), etc. */ |
153 | #include <linux/time.h> /* for do_gettimeofday */ | 153 | #include <linux/time.h> /* for do_gettimeofday */ |
154 | #include <linux/in.h> /* sockaddr_in */ | 154 | #include <linux/in.h> /* sockaddr_in */ |
155 | #include <linux/jiffies.h> /* time_after() macro */ | ||
155 | #include <asm/errno.h> | 156 | #include <asm/errno.h> |
156 | 157 | ||
157 | #include <linux/ip.h> | 158 | #include <linux/ip.h> |
@@ -773,7 +774,7 @@ static int update(struct wan_device* wandev) | |||
773 | for(;;) { | 774 | for(;;) { |
774 | if(card->u.f.update_comms_stats == 0) | 775 | if(card->u.f.update_comms_stats == 0) |
775 | break; | 776 | break; |
776 | if ((jiffies - timeout) > (1 * HZ)){ | 777 | if (time_after(jiffies, timeout + 1 * HZ)){ |
777 | card->u.f.update_comms_stats = 0; | 778 | card->u.f.update_comms_stats = 0; |
778 | return -EAGAIN; | 779 | return -EAGAIN; |
779 | } | 780 | } |
@@ -4799,7 +4800,7 @@ static void trigger_unconfig_fr(struct net_device *dev) | |||
4799 | { | 4800 | { |
4800 | fr_channel_t *chan = dev->priv; | 4801 | fr_channel_t *chan = dev->priv; |
4801 | volatile sdla_t *card = chan->card; | 4802 | volatile sdla_t *card = chan->card; |
4802 | u32 timeout; | 4803 | unsigned long timeout; |
4803 | fr508_flags_t* flags = card->flags; | 4804 | fr508_flags_t* flags = card->flags; |
4804 | int reset_critical=0; | 4805 | int reset_critical=0; |
4805 | 4806 | ||
@@ -4821,7 +4822,7 @@ static void trigger_unconfig_fr(struct net_device *dev) | |||
4821 | if(!(card->u.f.timer_int_enabled & TMR_INT_ENABLED_UNCONFIG)) | 4822 | if(!(card->u.f.timer_int_enabled & TMR_INT_ENABLED_UNCONFIG)) |
4822 | break; | 4823 | break; |
4823 | 4824 | ||
4824 | if ((jiffies - timeout) > (1 * HZ)){ | 4825 | if (time_after(jiffies, timeout + 1 * HZ)){ |
4825 | card->u.f.timer_int_enabled &= ~TMR_INT_ENABLED_UNCONFIG; | 4826 | card->u.f.timer_int_enabled &= ~TMR_INT_ENABLED_UNCONFIG; |
4826 | printk(KERN_INFO "%s: Failed to delete DLCI %i\n", | 4827 | printk(KERN_INFO "%s: Failed to delete DLCI %i\n", |
4827 | card->devname,chan->dlci); | 4828 | card->devname,chan->dlci); |
diff --git a/drivers/net/wan/sdla_ft1.c b/drivers/net/wan/sdla_ft1.c index 5e3124856eb0..9d6528a50f7b 100644 --- a/drivers/net/wan/sdla_ft1.c +++ b/drivers/net/wan/sdla_ft1.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/wanrouter.h> /* WAN router definitions */ | 29 | #include <linux/wanrouter.h> /* WAN router definitions */ |
30 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ | 30 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ |
31 | #include <linux/if_arp.h> /* ARPHRD_* defines */ | 31 | #include <linux/if_arp.h> /* ARPHRD_* defines */ |
32 | #include <linux/jiffies.h> /* time_after() macro */ | ||
32 | 33 | ||
33 | #include <linux/inetdevice.h> | 34 | #include <linux/inetdevice.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -164,7 +165,7 @@ int wpft1_init (sdla_t* card, wandev_conf_t* conf) | |||
164 | 165 | ||
165 | timeout = jiffies; | 166 | timeout = jiffies; |
166 | while (mb->return_code != 'I') /* Wait 1s for board to initialize */ | 167 | while (mb->return_code != 'I') /* Wait 1s for board to initialize */ |
167 | if ((jiffies - timeout) > 1*HZ) break; | 168 | if (time_after(jiffies, timeout + 1*HZ)) break; |
168 | 169 | ||
169 | if (mb->return_code != 'I') { | 170 | if (mb->return_code != 'I') { |
170 | printk(KERN_INFO | 171 | printk(KERN_INFO |
diff --git a/drivers/net/wan/sdla_ppp.c b/drivers/net/wan/sdla_ppp.c index 1761cb68ab48..a4b489cccbbf 100644 --- a/drivers/net/wan/sdla_ppp.c +++ b/drivers/net/wan/sdla_ppp.c | |||
@@ -101,6 +101,7 @@ | |||
101 | #include <linux/if_arp.h> /* ARPHRD_* defines */ | 101 | #include <linux/if_arp.h> /* ARPHRD_* defines */ |
102 | #include <asm/byteorder.h> /* htons(), etc. */ | 102 | #include <asm/byteorder.h> /* htons(), etc. */ |
103 | #include <linux/in.h> /* sockaddr_in */ | 103 | #include <linux/in.h> /* sockaddr_in */ |
104 | #include <linux/jiffies.h> /* time_after() macro */ | ||
104 | 105 | ||
105 | 106 | ||
106 | #include <asm/uaccess.h> | 107 | #include <asm/uaccess.h> |
@@ -482,7 +483,7 @@ static int update(struct wan_device *wandev) | |||
482 | if(ppp_priv_area->update_comms_stats == 0){ | 483 | if(ppp_priv_area->update_comms_stats == 0){ |
483 | break; | 484 | break; |
484 | } | 485 | } |
485 | if ((jiffies - timeout) > (1 * HZ)){ | 486 | if (time_after(jiffies, timeout + 1 * HZ)){ |
486 | ppp_priv_area->update_comms_stats = 0; | 487 | ppp_priv_area->update_comms_stats = 0; |
487 | ppp_priv_area->timer_int_enabled &= | 488 | ppp_priv_area->timer_int_enabled &= |
488 | ~TMR_INT_ENABLED_UPDATE; | 489 | ~TMR_INT_ENABLED_UPDATE; |
diff --git a/drivers/net/wan/sdla_x25.c b/drivers/net/wan/sdla_x25.c index 3a93d2fd4fbf..8a95d61a2f8f 100644 --- a/drivers/net/wan/sdla_x25.c +++ b/drivers/net/wan/sdla_x25.c | |||
@@ -91,6 +91,7 @@ | |||
91 | #include <linux/wanrouter.h> /* WAN router definitions */ | 91 | #include <linux/wanrouter.h> /* WAN router definitions */ |
92 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ | 92 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ |
93 | #include <linux/workqueue.h> | 93 | #include <linux/workqueue.h> |
94 | #include <linux/jiffies.h> /* time_after() macro */ | ||
94 | #include <asm/byteorder.h> /* htons(), etc. */ | 95 | #include <asm/byteorder.h> /* htons(), etc. */ |
95 | #include <asm/atomic.h> | 96 | #include <asm/atomic.h> |
96 | #include <linux/delay.h> /* Experimental delay */ | 97 | #include <linux/delay.h> /* Experimental delay */ |
@@ -867,7 +868,7 @@ static int update(struct wan_device* wandev) | |||
867 | if (!(card->u.x.timer_int_enabled & TMR_INT_ENABLED_UPDATE)){ | 868 | if (!(card->u.x.timer_int_enabled & TMR_INT_ENABLED_UPDATE)){ |
868 | break; | 869 | break; |
869 | } | 870 | } |
870 | if ((jiffies-timeout) > 1*HZ){ | 871 | if (time_after(jiffies, timeout + 1*HZ)){ |
871 | card->u.x.timer_int_enabled &= ~TMR_INT_ENABLED_UPDATE; | 872 | card->u.x.timer_int_enabled &= ~TMR_INT_ENABLED_UPDATE; |
872 | return -EAGAIN; | 873 | return -EAGAIN; |
873 | } | 874 | } |
diff --git a/drivers/net/wan/wanpipe_multppp.c b/drivers/net/wan/wanpipe_multppp.c index 6aa6987d96cb..812a1183c502 100644 --- a/drivers/net/wan/wanpipe_multppp.c +++ b/drivers/net/wan/wanpipe_multppp.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/wanrouter.h> /* WAN router definitions */ | 26 | #include <linux/wanrouter.h> /* WAN router definitions */ |
27 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ | 27 | #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ |
28 | #include <linux/if_arp.h> /* ARPHRD_* defines */ | 28 | #include <linux/if_arp.h> /* ARPHRD_* defines */ |
29 | #include <linux/jiffies.h> /* time_after() macro */ | ||
29 | 30 | ||
30 | #include <linux/in.h> /* sockaddr_in */ | 31 | #include <linux/in.h> /* sockaddr_in */ |
31 | #include <linux/inet.h> | 32 | #include <linux/inet.h> |
@@ -270,9 +271,9 @@ int wsppp_init (sdla_t* card, wandev_conf_t* conf) | |||
270 | ready to accept commands. We expect this to be completed in less | 271 | ready to accept commands. We expect this to be completed in less |
271 | than 1 second. */ | 272 | than 1 second. */ |
272 | 273 | ||
273 | timeout = jiffies; | 274 | timeout = jiffies + 1 * HZ; |
274 | while (mb->return_code != 'I') /* Wait 1s for board to initialize */ | 275 | while (mb->return_code != 'I') /* Wait 1s for board to initialize */ |
275 | if ((jiffies - timeout) > 1*HZ) break; | 276 | if (time_after(jiffies, timeout)) break; |
276 | 277 | ||
277 | if (mb->return_code != 'I') { | 278 | if (mb->return_code != 'I') { |
278 | printk(KERN_INFO | 279 | printk(KERN_INFO |
@@ -493,11 +494,11 @@ static int update(struct wan_device* wandev) | |||
493 | chdlc_priv_area->timer_int_enabled = TMR_INT_ENABLED_UPDATE; | 494 | chdlc_priv_area->timer_int_enabled = TMR_INT_ENABLED_UPDATE; |
494 | 495 | ||
495 | /* wait a maximum of 1 second for the statistics to be updated */ | 496 | /* wait a maximum of 1 second for the statistics to be updated */ |
496 | timeout = jiffies; | 497 | timeout = jiffies + 1 * HZ; |
497 | for(;;) { | 498 | for(;;) { |
498 | if(chdlc_priv_area->update_comms_stats == 0) | 499 | if(chdlc_priv_area->update_comms_stats == 0) |
499 | break; | 500 | break; |
500 | if ((jiffies - timeout) > (1 * HZ)){ | 501 | if (time_after(jiffies, timeout)){ |
501 | chdlc_priv_area->update_comms_stats = 0; | 502 | chdlc_priv_area->update_comms_stats = 0; |
502 | chdlc_priv_area->timer_int_enabled &= | 503 | chdlc_priv_area->timer_int_enabled &= |
503 | ~TMR_INT_ENABLED_UPDATE; | 504 | ~TMR_INT_ENABLED_UPDATE; |
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index d0cbbb7f0385..6bd581e69afd 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -448,19 +448,19 @@ static void speedtch_check_status(struct speedtch_instance_data *instance) | |||
448 | case 0: | 448 | case 0: |
449 | atm_dev->signal = ATM_PHY_SIG_LOST; | 449 | atm_dev->signal = ATM_PHY_SIG_LOST; |
450 | if (instance->last_status) | 450 | if (instance->last_status) |
451 | atm_info(usbatm, "ADSL line is down\n"); | 451 | atm_info(usbatm, "%s\n", "ADSL line is down"); |
452 | /* It may never resync again unless we ask it to... */ | 452 | /* It may never resync again unless we ask it to... */ |
453 | ret = speedtch_start_synchro(instance); | 453 | ret = speedtch_start_synchro(instance); |
454 | break; | 454 | break; |
455 | 455 | ||
456 | case 0x08: | 456 | case 0x08: |
457 | atm_dev->signal = ATM_PHY_SIG_UNKNOWN; | 457 | atm_dev->signal = ATM_PHY_SIG_UNKNOWN; |
458 | atm_info(usbatm, "ADSL line is blocked?\n"); | 458 | atm_info(usbatm, "%s\n", "ADSL line is blocked?"); |
459 | break; | 459 | break; |
460 | 460 | ||
461 | case 0x10: | 461 | case 0x10: |
462 | atm_dev->signal = ATM_PHY_SIG_LOST; | 462 | atm_dev->signal = ATM_PHY_SIG_LOST; |
463 | atm_info(usbatm, "ADSL line is synchronising\n"); | 463 | atm_info(usbatm, "%s\n", "ADSL line is synchronising"); |
464 | break; | 464 | break; |
465 | 465 | ||
466 | case 0x20: | 466 | case 0x20: |
@@ -502,7 +502,7 @@ static void speedtch_status_poll(unsigned long data) | |||
502 | if (instance->poll_delay < MAX_POLL_DELAY) | 502 | if (instance->poll_delay < MAX_POLL_DELAY) |
503 | mod_timer(&instance->status_checker.timer, jiffies + msecs_to_jiffies(instance->poll_delay)); | 503 | mod_timer(&instance->status_checker.timer, jiffies + msecs_to_jiffies(instance->poll_delay)); |
504 | else | 504 | else |
505 | atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); | 505 | atm_warn(instance->usbatm, "%s\n", "Too many failures - disabling line status polling"); |
506 | } | 506 | } |
507 | 507 | ||
508 | static void speedtch_resubmit_int(unsigned long data) | 508 | static void speedtch_resubmit_int(unsigned long data) |
@@ -545,9 +545,9 @@ static void speedtch_handle_int(struct urb *int_urb, struct pt_regs *regs) | |||
545 | 545 | ||
546 | if ((count == 6) && !memcmp(up_int, instance->int_data, 6)) { | 546 | if ((count == 6) && !memcmp(up_int, instance->int_data, 6)) { |
547 | del_timer(&instance->status_checker.timer); | 547 | del_timer(&instance->status_checker.timer); |
548 | atm_info(usbatm, "DSL line goes up\n"); | 548 | atm_info(usbatm, "%s\n", "DSL line goes up"); |
549 | } else if ((count == 6) && !memcmp(down_int, instance->int_data, 6)) { | 549 | } else if ((count == 6) && !memcmp(down_int, instance->int_data, 6)) { |
550 | atm_info(usbatm, "DSL line goes down\n"); | 550 | atm_info(usbatm, "%s\n", "DSL line goes down"); |
551 | } else { | 551 | } else { |
552 | int i; | 552 | int i; |
553 | 553 | ||