diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
commit | 2fca877b68b2b4fc5b94277858a1bedd46017cde (patch) | |
tree | fd02725406299ba2f26354463b3c261721e9eb6b /drivers/net/wan | |
parent | ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef (diff) | |
parent | 02b3e4e2d71b6058ec11cc01c72ac651eb3ded2b (diff) |
/spare/repo/libata-dev branch 'v2.6.13'
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_ppp.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_raw.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/net/wan/wanxl.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 2 |
12 files changed, 26 insertions, 23 deletions
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index 66b94668ddd8..18c27e1e7884 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig | |||
@@ -435,7 +435,7 @@ config VENDOR_SANGOMA | |||
435 | the driver to support. | 435 | the driver to support. |
436 | 436 | ||
437 | If you have one or more of these cards, say M to this option; | 437 | If you have one or more of these cards, say M to this option; |
438 | and read <file:Documentation/networking/wanpipe.txt>. | 438 | and read <file:Documentation/networking/wan-router.txt>. |
439 | 439 | ||
440 | To compile this driver as a module, choose M here: the | 440 | To compile this driver as a module, choose M here: the |
441 | module will be called wanpipe. | 441 | module will be called wanpipe. |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 7575b799ce53..2c83cca34b86 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -861,8 +861,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port, | |||
861 | /* | 861 | /* |
862 | * Mark it for our own raw sockets interface | 862 | * Mark it for our own raw sockets interface |
863 | */ | 863 | */ |
864 | static unsigned short farsync_type_trans(struct sk_buff *skb, | 864 | static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev) |
865 | struct net_device *dev) | ||
866 | { | 865 | { |
867 | skb->dev = dev; | 866 | skb->dev = dev; |
868 | skb->mac.raw = skb->data; | 867 | skb->mac.raw = skb->data; |
@@ -981,6 +980,7 @@ fst_issue_cmd(struct fst_port_info *port, unsigned short cmd) | |||
981 | /* Wait for any previous command to complete */ | 980 | /* Wait for any previous command to complete */ |
982 | while (mbval > NAK) { | 981 | while (mbval > NAK) { |
983 | spin_unlock_irqrestore(&card->card_lock, flags); | 982 | spin_unlock_irqrestore(&card->card_lock, flags); |
983 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
984 | schedule_timeout(1); | 984 | schedule_timeout(1); |
985 | spin_lock_irqsave(&card->card_lock, flags); | 985 | spin_lock_irqsave(&card->card_lock, flags); |
986 | 986 | ||
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index c1b6896d7007..48c03c11cd9a 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -72,7 +72,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
72 | } | 72 | } |
73 | skb_reserve(skb, 4); | 73 | skb_reserve(skb, 4); |
74 | cisco_hard_header(skb, dev, CISCO_KEEPALIVE, NULL, NULL, 0); | 74 | cisco_hard_header(skb, dev, CISCO_KEEPALIVE, NULL, NULL, 0); |
75 | data = (cisco_packet*)skb->tail; | 75 | data = (cisco_packet*)skb->data; |
76 | 76 | ||
77 | data->type = htonl(type); | 77 | data->type = htonl(type); |
78 | data->par1 = htonl(par1); | 78 | data->par1 = htonl(par1); |
@@ -91,8 +91,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | static unsigned short cisco_type_trans(struct sk_buff *skb, | 94 | static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev) |
95 | struct net_device *dev) | ||
96 | { | 95 | { |
97 | hdlc_header *data = (hdlc_header*)skb->data; | 96 | hdlc_header *data = (hdlc_header*)skb->data; |
98 | 97 | ||
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 7cd6195a2e46..b81263eaede0 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -66,8 +66,7 @@ static void ppp_close(struct net_device *dev) | |||
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | static unsigned short ppp_type_trans(struct sk_buff *skb, | 69 | static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev) |
70 | struct net_device *dev) | ||
71 | { | 70 | { |
72 | return __constant_htons(ETH_P_WAN_PPP); | 71 | return __constant_htons(ETH_P_WAN_PPP); |
73 | } | 72 | } |
diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index c41fb70b6929..9456d31cb1c1 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c | |||
@@ -24,8 +24,7 @@ | |||
24 | #include <linux/hdlc.h> | 24 | #include <linux/hdlc.h> |
25 | 25 | ||
26 | 26 | ||
27 | static unsigned short raw_type_trans(struct sk_buff *skb, | 27 | static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev) |
28 | struct net_device *dev) | ||
29 | { | 28 | { |
30 | return __constant_htons(ETH_P_IP); | 29 | return __constant_htons(ETH_P_IP); |
31 | } | 30 | } |
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/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 1e7b47704ad9..9c1e10602f2b 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/hdlc.h> | 27 | #include <linux/hdlc.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/dma-mapping.h> | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/delay.h> | 31 | #include <asm/delay.h> |
31 | 32 | ||
@@ -624,8 +625,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, | |||
624 | /* FIXME when PCI/DMA subsystems are fixed. | 625 | /* FIXME when PCI/DMA subsystems are fixed. |
625 | We set both dma_mask and consistent_dma_mask back to 32 bits | 626 | We set both dma_mask and consistent_dma_mask back to 32 bits |
626 | to indicate the card can do 32-bit DMA addressing */ | 627 | to indicate the card can do 32-bit DMA addressing */ |
627 | if (pci_set_consistent_dma_mask(pdev, 0xFFFFFFFF) || | 628 | if (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) || |
628 | pci_set_dma_mask(pdev, 0xFFFFFFFF)) { | 629 | pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { |
629 | printk(KERN_ERR "wanXL: No usable DMA configuration\n"); | 630 | printk(KERN_ERR "wanXL: No usable DMA configuration\n"); |
630 | wanxl_pci_remove_one(pdev); | 631 | wanxl_pci_remove_one(pdev); |
631 | return -EIO; | 632 | return -EIO; |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 1c540d825551..bdf672c48182 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -829,7 +829,7 @@ static void __exit exit_x25_asy(void) | |||
829 | } | 829 | } |
830 | 830 | ||
831 | kfree(x25_asy_devs); | 831 | kfree(x25_asy_devs); |
832 | tty_register_ldisc(N_X25, NULL); | 832 | tty_unregister_ldisc(N_X25); |
833 | } | 833 | } |
834 | 834 | ||
835 | module_init(init_x25_asy); | 835 | module_init(init_x25_asy); |