diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/net/wan | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/Kconfig | 35 | ||||
-rw-r--r-- | drivers/net/wan/Makefile | 9 | ||||
-rw-r--r-- | drivers/net/wan/c101.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/dlci.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 34 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 13 | ||||
-rw-r--r-- | drivers/net/wan/hd64570.c | 6 | ||||
-rw-r--r-- | drivers/net/wan/hd64572.c | 6 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_ppp.c | 14 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_raw_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_x25.c | 16 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 15 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 23 | ||||
-rw-r--r-- | drivers/net/wan/n2.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/pc300too.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/pci200syn.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/sbni.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/sdla.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/sealevel.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/wanxlfw.S | 1 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 10 | ||||
-rw-r--r-- | drivers/net/wan/z85230.c | 2 |
25 files changed, 151 insertions, 72 deletions
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index d58431e99f7..423eb26386c 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig | |||
@@ -203,6 +203,37 @@ config WANXL_BUILD_FIRMWARE | |||
203 | 203 | ||
204 | You should never need this option, say N. | 204 | You should never need this option, say N. |
205 | 205 | ||
206 | config PC300 | ||
207 | tristate "Cyclades-PC300 support (RS-232/V.35, X.21, T1/E1 boards)" | ||
208 | depends on HDLC && PCI && BROKEN | ||
209 | ---help--- | ||
210 | This driver is broken because of struct tty_driver change. | ||
211 | |||
212 | Driver for the Cyclades-PC300 synchronous communication boards. | ||
213 | |||
214 | These boards provide synchronous serial interfaces to your | ||
215 | Linux box (interfaces currently available are RS-232/V.35, X.21 and | ||
216 | T1/E1). If you wish to support Multilink PPP, please select the | ||
217 | option later and read the file README.mlppp provided by PC300 | ||
218 | package. | ||
219 | |||
220 | To compile this as a module, choose M here: the module | ||
221 | will be called pc300. | ||
222 | |||
223 | If unsure, say N. | ||
224 | |||
225 | config PC300_MLPPP | ||
226 | bool "Cyclades-PC300 MLPPP support" | ||
227 | depends on PC300 && PPP_MULTILINK && PPP_SYNC_TTY && HDLC_PPP | ||
228 | help | ||
229 | Multilink PPP over the PC300 synchronous communication boards. | ||
230 | |||
231 | comment "Cyclades-PC300 MLPPP support is disabled." | ||
232 | depends on HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP) | ||
233 | |||
234 | comment "Refer to the file README.mlppp, provided by PC300 package." | ||
235 | depends on HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP) | ||
236 | |||
206 | config PC300TOO | 237 | config PC300TOO |
207 | tristate "Cyclades PC300 RSV/X21 alternative support" | 238 | tristate "Cyclades PC300 RSV/X21 alternative support" |
208 | depends on HDLC && PCI | 239 | depends on HDLC && PCI |
@@ -259,8 +290,8 @@ config FARSYNC | |||
259 | Frame Relay or X.25/LAPB. | 290 | Frame Relay or X.25/LAPB. |
260 | 291 | ||
261 | If you want the module to be automatically loaded when the interface | 292 | If you want the module to be automatically loaded when the interface |
262 | is referenced then you should add "alias hdlcX farsync" to a file | 293 | is referenced then you should add "alias hdlcX farsync" to |
263 | in /etc/modprobe.d/ for each interface, where X is 0, 1, 2, ..., or | 294 | /etc/modprobe.conf for each interface, where X is 0, 1, 2, ..., or |
264 | simply use "alias hdlc* farsync" to indicate all of them. | 295 | simply use "alias hdlc* farsync" to indicate all of them. |
265 | 296 | ||
266 | To compile this driver as a module, choose M here: the | 297 | To compile this driver as a module, choose M here: the |
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index df70248e2fd..19d14bc2835 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile | |||
@@ -17,6 +17,10 @@ obj-$(CONFIG_HDLC_FR) += hdlc_fr.o | |||
17 | obj-$(CONFIG_HDLC_PPP) += hdlc_ppp.o | 17 | obj-$(CONFIG_HDLC_PPP) += hdlc_ppp.o |
18 | obj-$(CONFIG_HDLC_X25) += hdlc_x25.o | 18 | obj-$(CONFIG_HDLC_X25) += hdlc_x25.o |
19 | 19 | ||
20 | pc300-y := pc300_drv.o | ||
21 | pc300-$(CONFIG_PC300_MLPPP) += pc300_tty.o | ||
22 | pc300-objs := $(pc300-y) | ||
23 | |||
20 | obj-$(CONFIG_HOSTESS_SV11) += z85230.o hostess_sv11.o | 24 | obj-$(CONFIG_HOSTESS_SV11) += z85230.o hostess_sv11.o |
21 | obj-$(CONFIG_SEALEVEL_4021) += z85230.o sealevel.o | 25 | obj-$(CONFIG_SEALEVEL_4021) += z85230.o sealevel.o |
22 | obj-$(CONFIG_COSA) += cosa.o | 26 | obj-$(CONFIG_COSA) += cosa.o |
@@ -31,6 +35,7 @@ obj-$(CONFIG_SDLA) += sdla.o | |||
31 | obj-$(CONFIG_CYCLADES_SYNC) += cycx_drv.o cyclomx.o | 35 | obj-$(CONFIG_CYCLADES_SYNC) += cycx_drv.o cyclomx.o |
32 | obj-$(CONFIG_LAPBETHER) += lapbether.o | 36 | obj-$(CONFIG_LAPBETHER) += lapbether.o |
33 | obj-$(CONFIG_SBNI) += sbni.o | 37 | obj-$(CONFIG_SBNI) += sbni.o |
38 | obj-$(CONFIG_PC300) += pc300.o | ||
34 | obj-$(CONFIG_N2) += n2.o | 39 | obj-$(CONFIG_N2) += n2.o |
35 | obj-$(CONFIG_C101) += c101.o | 40 | obj-$(CONFIG_C101) += c101.o |
36 | obj-$(CONFIG_WANXL) += wanxl.o | 41 | obj-$(CONFIG_WANXL) += wanxl.o |
@@ -52,9 +57,9 @@ endif | |||
52 | 57 | ||
53 | quiet_cmd_build_wanxlfw = BLD FW $@ | 58 | quiet_cmd_build_wanxlfw = BLD FW $@ |
54 | cmd_build_wanxlfw = \ | 59 | cmd_build_wanxlfw = \ |
55 | $(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ | 60 | $(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ |
56 | $(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ | 61 | $(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ |
57 | hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ | 62 | hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ |
58 | rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o | 63 | rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o |
59 | 64 | ||
60 | $(obj)/wanxlfw.inc: $(src)/wanxlfw.S | 65 | $(obj)/wanxlfw.inc: $(src)/wanxlfw.S |
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 09a50751763..54f995f4a5a 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c | |||
@@ -325,8 +325,10 @@ static int __init c101_run(unsigned long irq, unsigned long winbase) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 327 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
328 | if (card == NULL) | 328 | if (card == NULL) { |
329 | pr_err("unable to allocate memory\n"); | ||
329 | return -ENOBUFS; | 330 | return -ENOBUFS; |
331 | } | ||
330 | 332 | ||
331 | card->dev = alloc_hdlcdev(card); | 333 | card->dev = alloc_hdlcdev(card); |
332 | if (!card->dev) { | 334 | if (!card->dev) { |
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 147614ed86a..48ab38a34c5 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c | |||
@@ -50,6 +50,7 @@ | |||
50 | 50 | ||
51 | #include <net/sock.h> | 51 | #include <net/sock.h> |
52 | 52 | ||
53 | #include <asm/system.h> | ||
53 | #include <asm/io.h> | 54 | #include <asm/io.h> |
54 | #include <asm/dma.h> | 55 | #include <asm/dma.h> |
55 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 851dc7b7e8b..058e1697c17 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -93,6 +93,7 @@ | |||
93 | #include <linux/mm.h> | 93 | #include <linux/mm.h> |
94 | #include <linux/slab.h> | 94 | #include <linux/slab.h> |
95 | 95 | ||
96 | #include <asm/system.h> | ||
96 | #include <asm/cache.h> | 97 | #include <asm/cache.h> |
97 | #include <asm/byteorder.h> | 98 | #include <asm/byteorder.h> |
98 | #include <asm/uaccess.h> | 99 | #include <asm/uaccess.h> |
@@ -707,7 +708,8 @@ static void dscc4_free1(struct pci_dev *pdev) | |||
707 | kfree(ppriv); | 708 | kfree(ppriv); |
708 | } | 709 | } |
709 | 710 | ||
710 | static int dscc4_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 711 | static int __devinit dscc4_init_one(struct pci_dev *pdev, |
712 | const struct pci_device_id *ent) | ||
711 | { | 713 | { |
712 | struct dscc4_pci_priv *priv; | 714 | struct dscc4_pci_priv *priv; |
713 | struct dscc4_dev_priv *dpriv; | 715 | struct dscc4_dev_priv *dpriv; |
@@ -773,15 +775,14 @@ static int dscc4_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
773 | } | 775 | } |
774 | /* Global interrupt queue */ | 776 | /* Global interrupt queue */ |
775 | writel((u32)(((IRQ_RING_SIZE >> 5) - 1) << 20), ioaddr + IQLENR1); | 777 | writel((u32)(((IRQ_RING_SIZE >> 5) - 1) << 20), ioaddr + IQLENR1); |
776 | |||
777 | rc = -ENOMEM; | ||
778 | |||
779 | priv->iqcfg = (__le32 *) pci_alloc_consistent(pdev, | 778 | priv->iqcfg = (__le32 *) pci_alloc_consistent(pdev, |
780 | IRQ_RING_SIZE*sizeof(__le32), &priv->iqcfg_dma); | 779 | IRQ_RING_SIZE*sizeof(__le32), &priv->iqcfg_dma); |
781 | if (!priv->iqcfg) | 780 | if (!priv->iqcfg) |
782 | goto err_free_irq_5; | 781 | goto err_free_irq_5; |
783 | writel(priv->iqcfg_dma, ioaddr + IQCFG); | 782 | writel(priv->iqcfg_dma, ioaddr + IQCFG); |
784 | 783 | ||
784 | rc = -ENOMEM; | ||
785 | |||
785 | /* | 786 | /* |
786 | * SCC 0-3 private rx/tx irq structures | 787 | * SCC 0-3 private rx/tx irq structures |
787 | * IQRX/TXi needs to be set soon. Learned it the hard way... | 788 | * IQRX/TXi needs to be set soon. Learned it the hard way... |
@@ -902,8 +903,10 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) | |||
902 | int i, ret = -ENOMEM; | 903 | int i, ret = -ENOMEM; |
903 | 904 | ||
904 | root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL); | 905 | root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL); |
905 | if (!root) | 906 | if (!root) { |
907 | pr_err("can't allocate data\n"); | ||
906 | goto err_out; | 908 | goto err_out; |
909 | } | ||
907 | 910 | ||
908 | for (i = 0; i < dev_per_card; i++) { | 911 | for (i = 0; i < dev_per_card; i++) { |
909 | root[i].dev = alloc_hdlcdev(root + i); | 912 | root[i].dev = alloc_hdlcdev(root + i); |
@@ -912,8 +915,10 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) | |||
912 | } | 915 | } |
913 | 916 | ||
914 | ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL); | 917 | ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL); |
915 | if (!ppriv) | 918 | if (!ppriv) { |
919 | pr_err("can't allocate private data\n"); | ||
916 | goto err_free_dev; | 920 | goto err_free_dev; |
921 | } | ||
917 | 922 | ||
918 | ppriv->root = root; | 923 | ppriv->root = root; |
919 | spin_lock_init(&ppriv->lock); | 924 | spin_lock_init(&ppriv->lock); |
@@ -1967,7 +1972,7 @@ err_out: | |||
1967 | return -ENOMEM; | 1972 | return -ENOMEM; |
1968 | } | 1973 | } |
1969 | 1974 | ||
1970 | static void dscc4_remove_one(struct pci_dev *pdev) | 1975 | static void __devexit dscc4_remove_one(struct pci_dev *pdev) |
1971 | { | 1976 | { |
1972 | struct dscc4_pci_priv *ppriv; | 1977 | struct dscc4_pci_priv *ppriv; |
1973 | struct dscc4_dev_priv *root; | 1978 | struct dscc4_dev_priv *root; |
@@ -2052,7 +2057,18 @@ static struct pci_driver dscc4_driver = { | |||
2052 | .name = DRV_NAME, | 2057 | .name = DRV_NAME, |
2053 | .id_table = dscc4_pci_tbl, | 2058 | .id_table = dscc4_pci_tbl, |
2054 | .probe = dscc4_init_one, | 2059 | .probe = dscc4_init_one, |
2055 | .remove = dscc4_remove_one, | 2060 | .remove = __devexit_p(dscc4_remove_one), |
2056 | }; | 2061 | }; |
2057 | 2062 | ||
2058 | module_pci_driver(dscc4_driver); | 2063 | static int __init dscc4_init_module(void) |
2064 | { | ||
2065 | return pci_register_driver(&dscc4_driver); | ||
2066 | } | ||
2067 | |||
2068 | static void __exit dscc4_cleanup_module(void) | ||
2069 | { | ||
2070 | pci_unregister_driver(&dscc4_driver); | ||
2071 | } | ||
2072 | |||
2073 | module_init(dscc4_init_module); | ||
2074 | module_exit(dscc4_cleanup_module); | ||
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 56941d6547e..ebb9f24eefb 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -597,7 +597,7 @@ fst_q_work_item(u64 * queue, int card_index) | |||
597 | * bottom half for the card. Note the limitation of 64 cards. | 597 | * bottom half for the card. Note the limitation of 64 cards. |
598 | * That ought to be enough | 598 | * That ought to be enough |
599 | */ | 599 | */ |
600 | mask = (u64)1 << card_index; | 600 | mask = 1 << card_index; |
601 | *queue |= mask; | 601 | *queue |= mask; |
602 | spin_unlock_irqrestore(&fst_work_q_lock, flags); | 602 | spin_unlock_irqrestore(&fst_work_q_lock, flags); |
603 | } | 603 | } |
@@ -2361,7 +2361,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2361 | * via a printk and leave the corresponding interface and all that follow | 2361 | * via a printk and leave the corresponding interface and all that follow |
2362 | * disabled. | 2362 | * disabled. |
2363 | */ | 2363 | */ |
2364 | static char *type_strings[] = { | 2364 | static char *type_strings[] __devinitdata = { |
2365 | "no hardware", /* Should never be seen */ | 2365 | "no hardware", /* Should never be seen */ |
2366 | "FarSync T2P", | 2366 | "FarSync T2P", |
2367 | "FarSync T4P", | 2367 | "FarSync T4P", |
@@ -2371,7 +2371,7 @@ static char *type_strings[] = { | |||
2371 | "FarSync TE1" | 2371 | "FarSync TE1" |
2372 | }; | 2372 | }; |
2373 | 2373 | ||
2374 | static void | 2374 | static void __devinit |
2375 | fst_init_card(struct fst_card_info *card) | 2375 | fst_init_card(struct fst_card_info *card) |
2376 | { | 2376 | { |
2377 | int i; | 2377 | int i; |
@@ -2415,7 +2415,7 @@ static const struct net_device_ops fst_ops = { | |||
2415 | * Initialise card when detected. | 2415 | * Initialise card when detected. |
2416 | * Returns 0 to indicate success, or errno otherwise. | 2416 | * Returns 0 to indicate success, or errno otherwise. |
2417 | */ | 2417 | */ |
2418 | static int | 2418 | static int __devinit |
2419 | fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 2419 | fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
2420 | { | 2420 | { |
2421 | static int no_of_cards_added = 0; | 2421 | static int no_of_cards_added = 0; |
@@ -2483,7 +2483,6 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2483 | pr_err("Control memory remap failed\n"); | 2483 | pr_err("Control memory remap failed\n"); |
2484 | pci_release_regions(pdev); | 2484 | pci_release_regions(pdev); |
2485 | pci_disable_device(pdev); | 2485 | pci_disable_device(pdev); |
2486 | iounmap(card->mem); | ||
2487 | kfree(card); | 2486 | kfree(card); |
2488 | return -ENODEV; | 2487 | return -ENODEV; |
2489 | } | 2488 | } |
@@ -2615,7 +2614,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2615 | /* | 2614 | /* |
2616 | * Cleanup and close down a card | 2615 | * Cleanup and close down a card |
2617 | */ | 2616 | */ |
2618 | static void | 2617 | static void __devexit |
2619 | fst_remove_one(struct pci_dev *pdev) | 2618 | fst_remove_one(struct pci_dev *pdev) |
2620 | { | 2619 | { |
2621 | struct fst_card_info *card; | 2620 | struct fst_card_info *card; |
@@ -2652,7 +2651,7 @@ static struct pci_driver fst_driver = { | |||
2652 | .name = FST_NAME, | 2651 | .name = FST_NAME, |
2653 | .id_table = fst_pci_dev_id, | 2652 | .id_table = fst_pci_dev_id, |
2654 | .probe = fst_add_one, | 2653 | .probe = fst_add_one, |
2655 | .remove = fst_remove_one, | 2654 | .remove = __devexit_p(fst_remove_one), |
2656 | .suspend = NULL, | 2655 | .suspend = NULL, |
2657 | .resume = NULL, | 2656 | .resume = NULL, |
2658 | }; | 2657 | }; |
diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 62f01b74cbd..33b67d88fce 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/system.h> | ||
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
44 | #include "hd64570.h" | 45 | #include "hd64570.h" |
45 | 46 | ||
@@ -676,7 +677,8 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) | |||
676 | 677 | ||
677 | 678 | ||
678 | #ifdef NEED_DETECT_RAM | 679 | #ifdef NEED_DETECT_RAM |
679 | static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) | 680 | static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, |
681 | u32 ramsize) | ||
680 | { | 682 | { |
681 | /* Round RAM size to 32 bits, fill from end to start */ | 683 | /* Round RAM size to 32 bits, fill from end to start */ |
682 | u32 i = ramsize &= ~3; | 684 | u32 i = ramsize &= ~3; |
@@ -704,7 +706,7 @@ static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) | |||
704 | #endif /* NEED_DETECT_RAM */ | 706 | #endif /* NEED_DETECT_RAM */ |
705 | 707 | ||
706 | 708 | ||
707 | static void sca_init(card_t *card, int wait_states) | 709 | static void __devinit sca_init(card_t *card, int wait_states) |
708 | { | 710 | { |
709 | sca_out(wait_states, WCRL, card); /* Wait Control */ | 711 | sca_out(wait_states, WCRL, card); /* Wait Control */ |
710 | sca_out(wait_states, WCRM, card); | 712 | sca_out(wait_states, WCRM, card); |
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index 6269a09c736..efc0db10118 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/system.h> | ||
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
44 | #include "hd64572.h" | 45 | #include "hd64572.h" |
45 | 46 | ||
@@ -605,7 +606,8 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) | |||
605 | } | 606 | } |
606 | 607 | ||
607 | 608 | ||
608 | static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) | 609 | static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, |
610 | u32 ramsize) | ||
609 | { | 611 | { |
610 | /* Round RAM size to 32 bits, fill from end to start */ | 612 | /* Round RAM size to 32 bits, fill from end to start */ |
611 | u32 i = ramsize &= ~3; | 613 | u32 i = ramsize &= ~3; |
@@ -624,7 +626,7 @@ static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) | |||
624 | } | 626 | } |
625 | 627 | ||
626 | 628 | ||
627 | static void sca_init(card_t *card, int wait_states) | 629 | static void __devinit sca_init(card_t *card, int wait_states) |
628 | { | 630 | { |
629 | sca_out(wait_states, WCRL, card); /* Wait Control */ | 631 | sca_out(wait_states, WCRL, card); /* Wait Control */ |
630 | sca_out(wait_states, WCRM, card); | 632 | sca_out(wait_states, WCRM, card); |
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 7c6cb4f3179..eb2028187fb 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c | |||
@@ -1087,7 +1087,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) | |||
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | if (type == ARPHRD_ETHER) | 1089 | if (type == ARPHRD_ETHER) |
1090 | eth_hw_addr_random(dev); | 1090 | random_ether_addr(dev->dev_addr); |
1091 | else { | 1091 | else { |
1092 | *(__be16*)dev->dev_addr = htons(dlci); | 1092 | *(__be16*)dev->dev_addr = htons(dlci); |
1093 | dlci_to_q922(dev->broadcast, dlci); | 1093 | dlci_to_q922(dev->broadcast, dlci); |
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 0d7645581f9..055a918067e 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -515,37 +515,37 @@ static int ppp_rx(struct sk_buff *skb) | |||
515 | switch (cp->code) { | 515 | switch (cp->code) { |
516 | case CP_CONF_REQ: | 516 | case CP_CONF_REQ: |
517 | ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data); | 517 | ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data); |
518 | break; | 518 | goto out; |
519 | 519 | ||
520 | case CP_CONF_ACK: | 520 | case CP_CONF_ACK: |
521 | if (cp->id == proto->cr_id) | 521 | if (cp->id == proto->cr_id) |
522 | ppp_cp_event(dev, pid, RCA, 0, 0, 0, NULL); | 522 | ppp_cp_event(dev, pid, RCA, 0, 0, 0, NULL); |
523 | break; | 523 | goto out; |
524 | 524 | ||
525 | case CP_CONF_REJ: | 525 | case CP_CONF_REJ: |
526 | case CP_CONF_NAK: | 526 | case CP_CONF_NAK: |
527 | if (cp->id == proto->cr_id) | 527 | if (cp->id == proto->cr_id) |
528 | ppp_cp_event(dev, pid, RCN, 0, 0, 0, NULL); | 528 | ppp_cp_event(dev, pid, RCN, 0, 0, 0, NULL); |
529 | break; | 529 | goto out; |
530 | 530 | ||
531 | case CP_TERM_REQ: | 531 | case CP_TERM_REQ: |
532 | ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL); | 532 | ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL); |
533 | break; | 533 | goto out; |
534 | 534 | ||
535 | case CP_TERM_ACK: | 535 | case CP_TERM_ACK: |
536 | ppp_cp_event(dev, pid, RTA, 0, 0, 0, NULL); | 536 | ppp_cp_event(dev, pid, RTA, 0, 0, 0, NULL); |
537 | break; | 537 | goto out; |
538 | 538 | ||
539 | case CP_CODE_REJ: | 539 | case CP_CODE_REJ: |
540 | ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, 0, NULL); | 540 | ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, 0, NULL); |
541 | break; | 541 | goto out; |
542 | 542 | ||
543 | default: | 543 | default: |
544 | len += sizeof(struct cp_header); | 544 | len += sizeof(struct cp_header); |
545 | if (len > dev->mtu) | 545 | if (len > dev->mtu) |
546 | len = dev->mtu; | 546 | len = dev->mtu; |
547 | ppp_cp_event(dev, pid, RUC, 0, 0, len, cp); | 547 | ppp_cp_event(dev, pid, RUC, 0, 0, len, cp); |
548 | break; | 548 | goto out; |
549 | } | 549 | } |
550 | goto out; | 550 | goto out; |
551 | 551 | ||
diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index 3ab72b3082d..05c9b0b9623 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c | |||
@@ -101,7 +101,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) | |||
101 | old_qlen = dev->tx_queue_len; | 101 | old_qlen = dev->tx_queue_len; |
102 | ether_setup(dev); | 102 | ether_setup(dev); |
103 | dev->tx_queue_len = old_qlen; | 103 | dev->tx_queue_len = old_qlen; |
104 | eth_hw_addr_random(dev); | 104 | random_ether_addr(dev->dev_addr); |
105 | netif_dormant_off(dev); | 105 | netif_dormant_off(dev); |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index a49aec5efd2..56aeb011cb3 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c | |||
@@ -134,15 +134,15 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev) | |||
134 | 134 | ||
135 | static int x25_open(struct net_device *dev) | 135 | static int x25_open(struct net_device *dev) |
136 | { | 136 | { |
137 | struct lapb_register_struct cb; | ||
137 | int result; | 138 | int result; |
138 | static const struct lapb_register_struct cb = { | 139 | |
139 | .connect_confirmation = x25_connected, | 140 | cb.connect_confirmation = x25_connected; |
140 | .connect_indication = x25_connected, | 141 | cb.connect_indication = x25_connected; |
141 | .disconnect_confirmation = x25_disconnected, | 142 | cb.disconnect_confirmation = x25_disconnected; |
142 | .disconnect_indication = x25_disconnected, | 143 | cb.disconnect_indication = x25_disconnected; |
143 | .data_indication = x25_data_indication, | 144 | cb.data_indication = x25_data_indication; |
144 | .data_transmit = x25_data_transmit, | 145 | cb.data_transmit = x25_data_transmit; |
145 | }; | ||
146 | 146 | ||
147 | result = lapb_register(dev, &cb); | 147 | result = lapb_register(dev, &cb); |
148 | if (result != LAPB_OK) | 148 | if (result != LAPB_OK) |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index fc9d11d74d6..aaaca9aa229 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
12 | 12 | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
15 | #include <linux/cdev.h> | 14 | #include <linux/cdev.h> |
16 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
@@ -969,12 +968,10 @@ static int init_hdlc_queues(struct port *port) | |||
969 | { | 968 | { |
970 | int i; | 969 | int i; |
971 | 970 | ||
972 | if (!ports_open) { | 971 | if (!ports_open) |
973 | dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev, | 972 | if (!(dma_pool = dma_pool_create(DRV_NAME, NULL, |
974 | POOL_ALLOC_SIZE, 32, 0); | 973 | POOL_ALLOC_SIZE, 32, 0))) |
975 | if (!dma_pool) | ||
976 | return -ENOMEM; | 974 | return -ENOMEM; |
977 | } | ||
978 | 975 | ||
979 | if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL, | 976 | if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL, |
980 | &port->desc_tab_phys))) | 977 | &port->desc_tab_phys))) |
@@ -1326,7 +1323,7 @@ static const struct net_device_ops hss_hdlc_ops = { | |||
1326 | .ndo_do_ioctl = hss_hdlc_ioctl, | 1323 | .ndo_do_ioctl = hss_hdlc_ioctl, |
1327 | }; | 1324 | }; |
1328 | 1325 | ||
1329 | static int hss_init_one(struct platform_device *pdev) | 1326 | static int __devinit hss_init_one(struct platform_device *pdev) |
1330 | { | 1327 | { |
1331 | struct port *port; | 1328 | struct port *port; |
1332 | struct net_device *dev; | 1329 | struct net_device *dev; |
@@ -1365,7 +1362,7 @@ static int hss_init_one(struct platform_device *pdev) | |||
1365 | 1362 | ||
1366 | platform_set_drvdata(pdev, port); | 1363 | platform_set_drvdata(pdev, port); |
1367 | 1364 | ||
1368 | netdev_info(dev, "initialized\n"); | 1365 | netdev_info(dev, "HSS-%i\n", port->id); |
1369 | return 0; | 1366 | return 0; |
1370 | 1367 | ||
1371 | err_free_netdev: | 1368 | err_free_netdev: |
@@ -1377,7 +1374,7 @@ err_free: | |||
1377 | return err; | 1374 | return err; |
1378 | } | 1375 | } |
1379 | 1376 | ||
1380 | static int hss_remove_one(struct platform_device *pdev) | 1377 | static int __devexit hss_remove_one(struct platform_device *pdev) |
1381 | { | 1378 | { |
1382 | struct port *port = platform_get_drvdata(pdev); | 1379 | struct port *port = platform_get_drvdata(pdev); |
1383 | 1380 | ||
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index a73b49eb87e..a817081737a 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/if_arp.h> | 35 | #include <linux/if_arp.h> |
36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
37 | #include <net/sock.h> | 37 | #include <net/sock.h> |
38 | #include <asm/system.h> | ||
38 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
39 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
40 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
@@ -258,13 +259,14 @@ static int lapbeth_set_mac_address(struct net_device *dev, void *addr) | |||
258 | } | 259 | } |
259 | 260 | ||
260 | 261 | ||
261 | static const struct lapb_register_struct lapbeth_callbacks = { | 262 | static struct lapb_register_struct lapbeth_callbacks = { |
262 | .connect_confirmation = lapbeth_connected, | 263 | .connect_confirmation = lapbeth_connected, |
263 | .connect_indication = lapbeth_connected, | 264 | .connect_indication = lapbeth_connected, |
264 | .disconnect_confirmation = lapbeth_disconnected, | 265 | .disconnect_confirmation = lapbeth_disconnected, |
265 | .disconnect_indication = lapbeth_disconnected, | 266 | .disconnect_indication = lapbeth_disconnected, |
266 | .data_indication = lapbeth_data_indication, | 267 | .data_indication = lapbeth_data_indication, |
267 | .data_transmit = lapbeth_data_transmit, | 268 | .data_transmit = lapbeth_data_transmit, |
269 | |||
268 | }; | 270 | }; |
269 | 271 | ||
270 | /* | 272 | /* |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 7ef435bab42..b7f2358d23b 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -497,6 +497,7 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ | |||
497 | 497 | ||
498 | data = kmalloc(xc.len, GFP_KERNEL); | 498 | data = kmalloc(xc.len, GFP_KERNEL); |
499 | if (!data) { | 499 | if (!data) { |
500 | printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name); | ||
500 | ret = -ENOMEM; | 501 | ret = -ENOMEM; |
501 | break; | 502 | break; |
502 | } | 503 | } |
@@ -816,7 +817,8 @@ static const struct net_device_ops lmc_ops = { | |||
816 | .ndo_get_stats = lmc_get_stats, | 817 | .ndo_get_stats = lmc_get_stats, |
817 | }; | 818 | }; |
818 | 819 | ||
819 | static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 820 | static int __devinit lmc_init_one(struct pci_dev *pdev, |
821 | const struct pci_device_id *ent) | ||
820 | { | 822 | { |
821 | lmc_softc_t *sc; | 823 | lmc_softc_t *sc; |
822 | struct net_device *dev; | 824 | struct net_device *dev; |
@@ -985,7 +987,7 @@ err_req_io: | |||
985 | /* | 987 | /* |
986 | * Called from pci when removing module. | 988 | * Called from pci when removing module. |
987 | */ | 989 | */ |
988 | static void lmc_remove_one(struct pci_dev *pdev) | 990 | static void __devexit lmc_remove_one(struct pci_dev *pdev) |
989 | { | 991 | { |
990 | struct net_device *dev = pci_get_drvdata(pdev); | 992 | struct net_device *dev = pci_get_drvdata(pdev); |
991 | 993 | ||
@@ -1119,7 +1121,7 @@ static void lmc_running_reset (struct net_device *dev) /*fold00*/ | |||
1119 | { | 1121 | { |
1120 | lmc_softc_t *sc = dev_to_sc(dev); | 1122 | lmc_softc_t *sc = dev_to_sc(dev); |
1121 | 1123 | ||
1122 | lmc_trace(dev, "lmc_running_reset in"); | 1124 | lmc_trace(dev, "lmc_runnig_reset in"); |
1123 | 1125 | ||
1124 | /* stop interrupts */ | 1126 | /* stop interrupts */ |
1125 | /* Clear the interrupt mask */ | 1127 | /* Clear the interrupt mask */ |
@@ -1732,10 +1734,21 @@ static struct pci_driver lmc_driver = { | |||
1732 | .name = "lmc", | 1734 | .name = "lmc", |
1733 | .id_table = lmc_pci_tbl, | 1735 | .id_table = lmc_pci_tbl, |
1734 | .probe = lmc_init_one, | 1736 | .probe = lmc_init_one, |
1735 | .remove = lmc_remove_one, | 1737 | .remove = __devexit_p(lmc_remove_one), |
1736 | }; | 1738 | }; |
1737 | 1739 | ||
1738 | module_pci_driver(lmc_driver); | 1740 | static int __init init_lmc(void) |
1741 | { | ||
1742 | return pci_register_driver(&lmc_driver); | ||
1743 | } | ||
1744 | |||
1745 | static void __exit exit_lmc(void) | ||
1746 | { | ||
1747 | pci_unregister_driver(&lmc_driver); | ||
1748 | } | ||
1749 | |||
1750 | module_init(init_lmc); | ||
1751 | module_exit(exit_lmc); | ||
1739 | 1752 | ||
1740 | unsigned lmc_mii_readreg (lmc_softc_t * const sc, unsigned devaddr, unsigned regno) /*fold00*/ | 1753 | unsigned lmc_mii_readreg (lmc_softc_t * const sc, unsigned devaddr, unsigned regno) /*fold00*/ |
1741 | { | 1754 | { |
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 315bf09d6a2..5129ad514d2 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c | |||
@@ -358,8 +358,10 @@ static int __init n2_run(unsigned long io, unsigned long irq, | |||
358 | } | 358 | } |
359 | 359 | ||
360 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 360 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
361 | if (card == NULL) | 361 | if (card == NULL) { |
362 | pr_err("unable to allocate memory\n"); | ||
362 | return -ENOBUFS; | 363 | return -ENOBUFS; |
364 | } | ||
363 | 365 | ||
364 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); | 366 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); |
365 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); | 367 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); |
diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index 53efc57fcac..c49c1b3c7aa 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c | |||
@@ -297,8 +297,8 @@ static const struct net_device_ops pc300_ops = { | |||
297 | .ndo_do_ioctl = pc300_ioctl, | 297 | .ndo_do_ioctl = pc300_ioctl, |
298 | }; | 298 | }; |
299 | 299 | ||
300 | static int pc300_pci_init_one(struct pci_dev *pdev, | 300 | static int __devinit pc300_pci_init_one(struct pci_dev *pdev, |
301 | const struct pci_device_id *ent) | 301 | const struct pci_device_id *ent) |
302 | { | 302 | { |
303 | card_t *card; | 303 | card_t *card; |
304 | u32 __iomem *p; | 304 | u32 __iomem *p; |
@@ -320,6 +320,7 @@ static int pc300_pci_init_one(struct pci_dev *pdev, | |||
320 | 320 | ||
321 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 321 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
322 | if (card == NULL) { | 322 | if (card == NULL) { |
323 | pr_err("unable to allocate memory\n"); | ||
323 | pci_release_regions(pdev); | 324 | pci_release_regions(pdev); |
324 | pci_disable_device(pdev); | 325 | pci_disable_device(pdev); |
325 | return -ENOBUFS; | 326 | return -ENOBUFS; |
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index ddbce54040e..1ce21163c77 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c | |||
@@ -276,8 +276,8 @@ static const struct net_device_ops pci200_ops = { | |||
276 | .ndo_do_ioctl = pci200_ioctl, | 276 | .ndo_do_ioctl = pci200_ioctl, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static int pci200_pci_init_one(struct pci_dev *pdev, | 279 | static int __devinit pci200_pci_init_one(struct pci_dev *pdev, |
280 | const struct pci_device_id *ent) | 280 | const struct pci_device_id *ent) |
281 | { | 281 | { |
282 | card_t *card; | 282 | card_t *card; |
283 | u32 __iomem *p; | 283 | u32 __iomem *p; |
@@ -299,6 +299,7 @@ static int pci200_pci_init_one(struct pci_dev *pdev, | |||
299 | 299 | ||
300 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 300 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
301 | if (card == NULL) { | 301 | if (card == NULL) { |
302 | pr_err("unable to allocate memory\n"); | ||
302 | pci_release_regions(pdev); | 303 | pci_release_regions(pdev); |
303 | pci_disable_device(pdev); | 304 | pci_disable_device(pdev); |
304 | return -ENOBUFS; | 305 | return -ENOBUFS; |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index d43f4efd3e0..86127bcc9f7 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -155,7 +155,7 @@ static int emancipate( struct net_device * ); | |||
155 | static const char version[] = | 155 | static const char version[] = |
156 | "Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n"; | 156 | "Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n"; |
157 | 157 | ||
158 | static bool skip_pci_probe __initdata = false; | 158 | static int skip_pci_probe __initdata = 0; |
159 | static int scandone __initdata = 0; | 159 | static int scandone __initdata = 0; |
160 | static int num __initdata = 0; | 160 | static int num __initdata = 0; |
161 | 161 | ||
@@ -212,7 +212,7 @@ static const struct net_device_ops sbni_netdev_ops = { | |||
212 | .ndo_open = sbni_open, | 212 | .ndo_open = sbni_open, |
213 | .ndo_stop = sbni_close, | 213 | .ndo_stop = sbni_close, |
214 | .ndo_start_xmit = sbni_start_xmit, | 214 | .ndo_start_xmit = sbni_start_xmit, |
215 | .ndo_set_rx_mode = set_multicast_list, | 215 | .ndo_set_multicast_list = set_multicast_list, |
216 | .ndo_do_ioctl = sbni_ioctl, | 216 | .ndo_do_ioctl = sbni_ioctl, |
217 | .ndo_change_mtu = eth_change_mtu, | 217 | .ndo_change_mtu = eth_change_mtu, |
218 | .ndo_set_mac_address = eth_mac_addr, | 218 | .ndo_set_mac_address = eth_mac_addr, |
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index de3bbf43fc5..c8531612eea 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/sdla.h> | 54 | #include <linux/sdla.h> |
55 | #include <linux/bitops.h> | 55 | #include <linux/bitops.h> |
56 | 56 | ||
57 | #include <asm/system.h> | ||
57 | #include <asm/io.h> | 58 | #include <asm/io.h> |
58 | #include <asm/dma.h> | 59 | #include <asm/dma.h> |
59 | #include <asm/uaccess.h> | 60 | #include <asm/uaccess.h> |
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 4f774847898..0b4fd05e150 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c | |||
@@ -362,7 +362,7 @@ static int io=0x238; | |||
362 | static int txdma=1; | 362 | static int txdma=1; |
363 | static int rxdma=3; | 363 | static int rxdma=3; |
364 | static int irq=5; | 364 | static int irq=5; |
365 | static bool slow=false; | 365 | static int slow=0; |
366 | 366 | ||
367 | module_param(io, int, 0); | 367 | module_param(io, int, 0); |
368 | MODULE_PARM_DESC(io, "The I/O base of the Sealevel card"); | 368 | MODULE_PARM_DESC(io, "The I/O base of the Sealevel card"); |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 6a24a5a70cc..44b70719725 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -557,8 +557,8 @@ static const struct net_device_ops wanxl_ops = { | |||
557 | .ndo_get_stats = wanxl_get_stats, | 557 | .ndo_get_stats = wanxl_get_stats, |
558 | }; | 558 | }; |
559 | 559 | ||
560 | static int wanxl_pci_init_one(struct pci_dev *pdev, | 560 | static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, |
561 | const struct pci_device_id *ent) | 561 | const struct pci_device_id *ent) |
562 | { | 562 | { |
563 | card_t *card; | 563 | card_t *card; |
564 | u32 ramsize, stat; | 564 | u32 ramsize, stat; |
@@ -604,6 +604,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, | |||
604 | alloc_size = sizeof(card_t) + ports * sizeof(port_t); | 604 | alloc_size = sizeof(card_t) + ports * sizeof(port_t); |
605 | card = kzalloc(alloc_size, GFP_KERNEL); | 605 | card = kzalloc(alloc_size, GFP_KERNEL); |
606 | if (card == NULL) { | 606 | if (card == NULL) { |
607 | pr_err("%s: unable to allocate memory\n", pci_name(pdev)); | ||
607 | pci_release_regions(pdev); | 608 | pci_release_regions(pdev); |
608 | pci_disable_device(pdev); | 609 | pci_disable_device(pdev); |
609 | return -ENOBUFS; | 610 | return -ENOBUFS; |
diff --git a/drivers/net/wan/wanxlfw.S b/drivers/net/wan/wanxlfw.S index 21565d59ec7..73aae2bf2f1 100644 --- a/drivers/net/wan/wanxlfw.S +++ b/drivers/net/wan/wanxlfw.S | |||
@@ -35,7 +35,6 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/hdlc.h> | 37 | #include <linux/hdlc.h> |
38 | #include <linux/hdlc/ioctl.h> | ||
39 | #include "wanxl.h" | 38 | #include "wanxl.h" |
40 | 39 | ||
41 | /* memory addresses and offsets */ | 40 | /* memory addresses and offsets */ |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 44db8b75a53..46ceb3ae907 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | 20 | ||
21 | #include <asm/system.h> | ||
21 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
22 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
@@ -231,7 +232,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len) | |||
231 | } | 232 | } |
232 | 233 | ||
233 | p = icp; | 234 | p = icp; |
234 | count = x25_asy_esc(p, sl->xbuff, len); | 235 | count = x25_asy_esc(p, (unsigned char *) sl->xbuff, len); |
235 | 236 | ||
236 | /* Order of next two lines is *very* important. | 237 | /* Order of next two lines is *very* important. |
237 | * When we are sending a little amount of data, | 238 | * When we are sending a little amount of data, |
@@ -433,13 +434,14 @@ static void x25_asy_disconnected(struct net_device *dev, int reason) | |||
433 | netif_rx(skb); | 434 | netif_rx(skb); |
434 | } | 435 | } |
435 | 436 | ||
436 | static const struct lapb_register_struct x25_asy_callbacks = { | 437 | static struct lapb_register_struct x25_asy_callbacks = { |
437 | .connect_confirmation = x25_asy_connected, | 438 | .connect_confirmation = x25_asy_connected, |
438 | .connect_indication = x25_asy_connected, | 439 | .connect_indication = x25_asy_connected, |
439 | .disconnect_confirmation = x25_asy_disconnected, | 440 | .disconnect_confirmation = x25_asy_disconnected, |
440 | .disconnect_indication = x25_asy_disconnected, | 441 | .disconnect_indication = x25_asy_disconnected, |
441 | .data_indication = x25_asy_data_indication, | 442 | .data_indication = x25_asy_data_indication, |
442 | .data_transmit = x25_asy_data_transmit, | 443 | .data_transmit = x25_asy_data_transmit, |
444 | |||
443 | }; | 445 | }; |
444 | 446 | ||
445 | 447 | ||
@@ -785,8 +787,10 @@ static int __init init_x25_asy(void) | |||
785 | 787 | ||
786 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), | 788 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), |
787 | GFP_KERNEL); | 789 | GFP_KERNEL); |
788 | if (!x25_asy_devs) | 790 | if (!x25_asy_devs) { |
791 | pr_warn("Can't allocate x25_asy_ctrls[] array! Uaargh! (-> No X.25 available)\n"); | ||
789 | return -ENOMEM; | 792 | return -ENOMEM; |
793 | } | ||
790 | 794 | ||
791 | return tty_register_ldisc(N_X25, &x25_ldisc); | 795 | return tty_register_ldisc(N_X25, &x25_ldisc); |
792 | } | 796 | } |
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index feacc3b994b..0e576906170 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL(z8530_queue_xmit); | |||
1775 | /* | 1775 | /* |
1776 | * Module support | 1776 | * Module support |
1777 | */ | 1777 | */ |
1778 | static const char banner[] __initconst = | 1778 | static const char banner[] __initdata = |
1779 | KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n"; | 1779 | KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n"; |
1780 | 1780 | ||
1781 | static int __init z85230_init_driver(void) | 1781 | static int __init z85230_init_driver(void) |