diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-04 18:27:43 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-04 18:27:43 -0500 |
commit | 2ad657c88d8b3c1f97c1b8cc474b6307ba7f8509 (patch) | |
tree | 8b2aafc89feaffe5e726cf38f4110a638a776cc7 /drivers | |
parent | ff51a98799931256b555446b2f5675db08de6229 (diff) | |
parent | c69fda4e181fe448c43c2e1cc7b3fa67263d88ca (diff) |
Merge branch 'netdev-2.6.20' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird into tmp
Diffstat (limited to 'drivers')
41 files changed, 139 insertions, 131 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index 11d170afa9c3..06e33786078d 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c | |||
@@ -922,7 +922,7 @@ int __init init_module(void) | |||
922 | * and then free up the resources we took when the card was found. | 922 | * and then free up the resources we took when the card was found. |
923 | */ | 923 | */ |
924 | 924 | ||
925 | void cleanup_module(void) | 925 | void __exit cleanup_module(void) |
926 | { | 926 | { |
927 | struct net_device *dev = dev_3c501; | 927 | struct net_device *dev = dev_3c501; |
928 | unregister_netdev(dev); | 928 | unregister_netdev(dev); |
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c index a34b2206132d..7e34c4f07b70 100644 --- a/drivers/net/3c503.c +++ b/drivers/net/3c503.c | |||
@@ -726,7 +726,7 @@ static void cleanup_card(struct net_device *dev) | |||
726 | iounmap(ei_status.mem); | 726 | iounmap(ei_status.mem); |
727 | } | 727 | } |
728 | 728 | ||
729 | void | 729 | void __exit |
730 | cleanup_module(void) | 730 | cleanup_module(void) |
731 | { | 731 | { |
732 | int this_dev; | 732 | int this_dev; |
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 458cb9cbe915..702bfb2a5e99 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -1670,7 +1670,7 @@ int __init init_module(void) | |||
1670 | return 0; | 1670 | return 0; |
1671 | } | 1671 | } |
1672 | 1672 | ||
1673 | void cleanup_module(void) | 1673 | void __exit cleanup_module(void) |
1674 | { | 1674 | { |
1675 | int this_dev; | 1675 | int this_dev; |
1676 | 1676 | ||
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index aa43563610ae..54e1d5aebed3 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c | |||
@@ -940,7 +940,7 @@ int __init init_module(void) | |||
940 | return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; | 940 | return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; |
941 | } | 941 | } |
942 | 942 | ||
943 | void | 943 | void __exit |
944 | cleanup_module(void) | 944 | cleanup_module(void) |
945 | { | 945 | { |
946 | struct net_device *dev = dev_3c507; | 946 | struct net_device *dev = dev_3c507; |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 91849469b4f4..17d61eb0a7e5 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -1302,7 +1302,7 @@ int __init init_module(void) | |||
1302 | } else return 0; | 1302 | } else return 0; |
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | void cleanup_module(void) | 1305 | void __exit cleanup_module(void) |
1306 | { | 1306 | { |
1307 | int this_dev; | 1307 | int this_dev; |
1308 | for (this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) { | 1308 | for (this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) { |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index f4aca5386add..6c7437e60bd2 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -1659,7 +1659,7 @@ int __init init_module(void) | |||
1659 | * transmit operations are allowed to start scribbling into memory. | 1659 | * transmit operations are allowed to start scribbling into memory. |
1660 | */ | 1660 | */ |
1661 | 1661 | ||
1662 | void cleanup_module(void) | 1662 | void __exit cleanup_module(void) |
1663 | { | 1663 | { |
1664 | unregister_netdev(this_device); | 1664 | unregister_netdev(this_device); |
1665 | cleanup_card(this_device); | 1665 | cleanup_card(this_device); |
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 0dca8bb9d2c7..c01f87f5bed7 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c | |||
@@ -405,7 +405,7 @@ static void cleanup_card(struct net_device *dev) | |||
405 | iounmap(ei_status.mem); | 405 | iounmap(ei_status.mem); |
406 | } | 406 | } |
407 | 407 | ||
408 | void | 408 | void __exit |
409 | cleanup_module(void) | 409 | cleanup_module(void) |
410 | { | 410 | { |
411 | int this_dev; | 411 | int this_dev; |
diff --git a/drivers/net/apne.c b/drivers/net/apne.c index 9164d8cd670e..d4e408169073 100644 --- a/drivers/net/apne.c +++ b/drivers/net/apne.c | |||
@@ -568,7 +568,7 @@ static irqreturn_t apne_interrupt(int irq, void *dev_id) | |||
568 | #ifdef MODULE | 568 | #ifdef MODULE |
569 | static struct net_device *apne_dev; | 569 | static struct net_device *apne_dev; |
570 | 570 | ||
571 | int init_module(void) | 571 | int __init init_module(void) |
572 | { | 572 | { |
573 | apne_dev = apne_probe(-1); | 573 | apne_dev = apne_probe(-1); |
574 | if (IS_ERR(apne_dev)) | 574 | if (IS_ERR(apne_dev)) |
@@ -576,7 +576,7 @@ int init_module(void) | |||
576 | return 0; | 576 | return 0; |
577 | } | 577 | } |
578 | 578 | ||
579 | void cleanup_module(void) | 579 | void __exit cleanup_module(void) |
580 | { | 580 | { |
581 | unregister_netdev(apne_dev); | 581 | unregister_netdev(apne_dev); |
582 | 582 | ||
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index cc1a27ed197f..dba5e5165452 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -1041,7 +1041,7 @@ int __init init_module(void) | |||
1041 | return 0; | 1041 | return 0; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | void cleanup_module(void) | 1044 | void __exit cleanup_module(void) |
1045 | { | 1045 | { |
1046 | unregister_netdev(cops_dev); | 1046 | unregister_netdev(cops_dev); |
1047 | cleanup_card(cops_dev); | 1047 | cleanup_card(cops_dev); |
diff --git a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c index f3478a30e778..d6da3ce9ad79 100644 --- a/drivers/net/arm/ether1.c +++ b/drivers/net/arm/ether1.c | |||
@@ -254,7 +254,7 @@ ether1_readbuffer (struct net_device *dev, void *data, unsigned int start, unsig | |||
254 | } while (thislen); | 254 | } while (thislen); |
255 | } | 255 | } |
256 | 256 | ||
257 | static int __init | 257 | static int __devinit |
258 | ether1_ramtest(struct net_device *dev, unsigned char byte) | 258 | ether1_ramtest(struct net_device *dev, unsigned char byte) |
259 | { | 259 | { |
260 | unsigned char *buffer = kmalloc (BUFFER_SIZE, GFP_KERNEL); | 260 | unsigned char *buffer = kmalloc (BUFFER_SIZE, GFP_KERNEL); |
@@ -308,7 +308,7 @@ ether1_reset (struct net_device *dev) | |||
308 | return BUS_16; | 308 | return BUS_16; |
309 | } | 309 | } |
310 | 310 | ||
311 | static int __init | 311 | static int __devinit |
312 | ether1_init_2(struct net_device *dev) | 312 | ether1_init_2(struct net_device *dev) |
313 | { | 313 | { |
314 | int i; | 314 | int i; |
@@ -986,7 +986,7 @@ ether1_setmulticastlist (struct net_device *dev) | |||
986 | 986 | ||
987 | /* ------------------------------------------------------------------------- */ | 987 | /* ------------------------------------------------------------------------- */ |
988 | 988 | ||
989 | static void __init ether1_banner(void) | 989 | static void __devinit ether1_banner(void) |
990 | { | 990 | { |
991 | static unsigned int version_printed = 0; | 991 | static unsigned int version_printed = 0; |
992 | 992 | ||
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c index 84686c8a5bc2..4fc234785d56 100644 --- a/drivers/net/arm/ether3.c +++ b/drivers/net/arm/ether3.c | |||
@@ -198,7 +198,7 @@ static inline void ether3_ledon(struct net_device *dev) | |||
198 | * Read the ethernet address string from the on board rom. | 198 | * Read the ethernet address string from the on board rom. |
199 | * This is an ascii string!!! | 199 | * This is an ascii string!!! |
200 | */ | 200 | */ |
201 | static int __init | 201 | static int __devinit |
202 | ether3_addr(char *addr, struct expansion_card *ec) | 202 | ether3_addr(char *addr, struct expansion_card *ec) |
203 | { | 203 | { |
204 | struct in_chunk_dir cd; | 204 | struct in_chunk_dir cd; |
@@ -223,7 +223,7 @@ ether3_addr(char *addr, struct expansion_card *ec) | |||
223 | 223 | ||
224 | /* --------------------------------------------------------------------------- */ | 224 | /* --------------------------------------------------------------------------- */ |
225 | 225 | ||
226 | static int __init | 226 | static int __devinit |
227 | ether3_ramtest(struct net_device *dev, unsigned char byte) | 227 | ether3_ramtest(struct net_device *dev, unsigned char byte) |
228 | { | 228 | { |
229 | unsigned char *buffer = kmalloc(RX_END, GFP_KERNEL); | 229 | unsigned char *buffer = kmalloc(RX_END, GFP_KERNEL); |
@@ -272,7 +272,7 @@ ether3_ramtest(struct net_device *dev, unsigned char byte) | |||
272 | 272 | ||
273 | /* ------------------------------------------------------------------------------- */ | 273 | /* ------------------------------------------------------------------------------- */ |
274 | 274 | ||
275 | static int __init ether3_init_2(struct net_device *dev) | 275 | static int __devinit ether3_init_2(struct net_device *dev) |
276 | { | 276 | { |
277 | int i; | 277 | int i; |
278 | 278 | ||
@@ -765,7 +765,7 @@ static void ether3_tx(struct net_device *dev) | |||
765 | } | 765 | } |
766 | } | 766 | } |
767 | 767 | ||
768 | static void __init ether3_banner(void) | 768 | static void __devinit ether3_banner(void) |
769 | { | 769 | { |
770 | static unsigned version_printed = 0; | 770 | static unsigned version_printed = 0; |
771 | 771 | ||
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index 8620a5b470f5..56ae8babd919 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -908,7 +908,7 @@ int __init init_module(void) | |||
908 | return 0; | 908 | return 0; |
909 | } | 909 | } |
910 | 910 | ||
911 | void | 911 | void __exit |
912 | cleanup_module(void) | 912 | cleanup_module(void) |
913 | { | 913 | { |
914 | unregister_netdev(dev_at1700); | 914 | unregister_netdev(dev_at1700); |
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index d79489e46249..7e37ac86a69a 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -1179,7 +1179,7 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) | |||
1179 | #ifdef MODULE | 1179 | #ifdef MODULE |
1180 | static struct net_device *atarilance_dev; | 1180 | static struct net_device *atarilance_dev; |
1181 | 1181 | ||
1182 | int init_module(void) | 1182 | int __init init_module(void) |
1183 | { | 1183 | { |
1184 | atarilance_dev = atarilance_probe(-1); | 1184 | atarilance_dev = atarilance_probe(-1); |
1185 | if (IS_ERR(atarilance_dev)) | 1185 | if (IS_ERR(atarilance_dev)) |
@@ -1187,7 +1187,7 @@ int init_module(void) | |||
1187 | return 0; | 1187 | return 0; |
1188 | } | 1188 | } |
1189 | 1189 | ||
1190 | void cleanup_module(void) | 1190 | void __exit cleanup_module(void) |
1191 | { | 1191 | { |
1192 | unregister_netdev(atarilance_dev); | 1192 | unregister_netdev(atarilance_dev); |
1193 | free_irq(atarilance_dev->irq, atarilance_dev); | 1193 | free_irq(atarilance_dev->irq, atarilance_dev); |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index dec70c2b374a..4612f71a7106 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1974,7 +1974,7 @@ out: | |||
1974 | return ret; | 1974 | return ret; |
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | void | 1977 | void __exit |
1978 | cleanup_module(void) | 1978 | cleanup_module(void) |
1979 | { | 1979 | { |
1980 | unregister_netdev(dev_cs89x0); | 1980 | unregister_netdev(dev_cs89x0); |
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c index d39e8480ca56..c62d9c6363c6 100644 --- a/drivers/net/e2100.c +++ b/drivers/net/e2100.c | |||
@@ -463,7 +463,7 @@ static void cleanup_card(struct net_device *dev) | |||
463 | release_region(dev->base_addr, E21_IO_EXTENT); | 463 | release_region(dev->base_addr, E21_IO_EXTENT); |
464 | } | 464 | } |
465 | 465 | ||
466 | void | 466 | void __exit |
467 | cleanup_module(void) | 467 | cleanup_module(void) |
468 | { | 468 | { |
469 | int this_dev; | 469 | int this_dev; |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index a4eb0dc99ecf..b4463094c93a 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -1827,7 +1827,7 @@ int __init init_module(void) | |||
1827 | return n_eepro ? 0 : -ENODEV; | 1827 | return n_eepro ? 0 : -ENODEV; |
1828 | } | 1828 | } |
1829 | 1829 | ||
1830 | void | 1830 | void __exit |
1831 | cleanup_module(void) | 1831 | cleanup_module(void) |
1832 | { | 1832 | { |
1833 | int i; | 1833 | int i; |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index e14be020e562..4a50fcb5ad6b 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -1719,7 +1719,7 @@ int __init init_module(void) | |||
1719 | return -ENXIO; | 1719 | return -ENXIO; |
1720 | } | 1720 | } |
1721 | 1721 | ||
1722 | void cleanup_module(void) | 1722 | void __exit cleanup_module(void) |
1723 | { | 1723 | { |
1724 | int this_dev; | 1724 | int this_dev; |
1725 | 1725 | ||
diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c index fd7b32a24ea4..2d2ea94a00bb 100644 --- a/drivers/net/es3210.c +++ b/drivers/net/es3210.c | |||
@@ -455,7 +455,7 @@ static void cleanup_card(struct net_device *dev) | |||
455 | iounmap(ei_status.mem); | 455 | iounmap(ei_status.mem); |
456 | } | 456 | } |
457 | 457 | ||
458 | void | 458 | void __exit |
459 | cleanup_module(void) | 459 | cleanup_module(void) |
460 | { | 460 | { |
461 | int this_dev; | 461 | int this_dev; |
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index b7b8bc2a6307..93283e386f3a 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
@@ -1475,7 +1475,7 @@ int __init init_module(void) | |||
1475 | return -ENXIO; | 1475 | return -ENXIO; |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | void cleanup_module(void) | 1478 | void __exit cleanup_module(void) |
1479 | { | 1479 | { |
1480 | int this_dev; | 1480 | int this_dev; |
1481 | 1481 | ||
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 6abcfd2a4b28..99a36cc3f8df 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -482,7 +482,7 @@ static void cleanup_card(struct net_device *dev) | |||
482 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | 482 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); |
483 | } | 483 | } |
484 | 484 | ||
485 | void | 485 | void __exit |
486 | cleanup_module(void) | 486 | cleanup_module(void) |
487 | { | 487 | { |
488 | int this_dev; | 488 | int this_dev; |
diff --git a/drivers/net/hp.c b/drivers/net/hp.c index 29470970aa27..635b13c2e2aa 100644 --- a/drivers/net/hp.c +++ b/drivers/net/hp.c | |||
@@ -444,7 +444,7 @@ static void cleanup_card(struct net_device *dev) | |||
444 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | 444 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); |
445 | } | 445 | } |
446 | 446 | ||
447 | void | 447 | void __exit |
448 | cleanup_module(void) | 448 | cleanup_module(void) |
449 | { | 449 | { |
450 | int this_dev; | 450 | int this_dev; |
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 4256c13c73c2..a3843320dbe1 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -368,7 +368,7 @@ static void cleanup_card(struct net_device *dev) | |||
368 | kfree(lp); | 368 | kfree(lp); |
369 | } | 369 | } |
370 | 370 | ||
371 | void cleanup_module(void) | 371 | void __exit cleanup_module(void) |
372 | { | 372 | { |
373 | int this_dev; | 373 | int this_dev; |
374 | 374 | ||
diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c index 5795ee116205..0a08d0c4e7b4 100644 --- a/drivers/net/lne390.c +++ b/drivers/net/lne390.c | |||
@@ -440,7 +440,7 @@ static void cleanup_card(struct net_device *dev) | |||
440 | iounmap(ei_status.mem); | 440 | iounmap(ei_status.mem); |
441 | } | 441 | } |
442 | 442 | ||
443 | void cleanup_module(void) | 443 | void __exit cleanup_module(void) |
444 | { | 444 | { |
445 | int this_dev; | 445 | int this_dev; |
446 | 446 | ||
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 9997081c6dae..21d0137b6004 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -1098,7 +1098,7 @@ static void eth_tx_fill_frag_descs(struct mv643xx_private *mp, | |||
1098 | ETH_TX_ENABLE_INTERRUPT; | 1098 | ETH_TX_ENABLE_INTERRUPT; |
1099 | mp->tx_skb[tx_index] = skb; | 1099 | mp->tx_skb[tx_index] = skb; |
1100 | } else | 1100 | } else |
1101 | mp->tx_skb[tx_index] = 0; | 1101 | mp->tx_skb[tx_index] = NULL; |
1102 | 1102 | ||
1103 | desc = &mp->p_tx_desc_area[tx_index]; | 1103 | desc = &mp->p_tx_desc_area[tx_index]; |
1104 | desc->l4i_chk = 0; | 1104 | desc->l4i_chk = 0; |
@@ -1134,7 +1134,7 @@ static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp, | |||
1134 | eth_tx_fill_frag_descs(mp, skb); | 1134 | eth_tx_fill_frag_descs(mp, skb); |
1135 | 1135 | ||
1136 | length = skb_headlen(skb); | 1136 | length = skb_headlen(skb); |
1137 | mp->tx_skb[tx_index] = 0; | 1137 | mp->tx_skb[tx_index] = NULL; |
1138 | } else { | 1138 | } else { |
1139 | cmd_sts |= ETH_ZERO_PADDING | | 1139 | cmd_sts |= ETH_ZERO_PADDING | |
1140 | ETH_TX_LAST_DESC | | 1140 | ETH_TX_LAST_DESC | |
diff --git a/drivers/net/mvme147.c b/drivers/net/mvme147.c index 56a82d8ee8f5..e246d00bba6d 100644 --- a/drivers/net/mvme147.c +++ b/drivers/net/mvme147.c | |||
@@ -184,7 +184,7 @@ static int m147lance_close(struct net_device *dev) | |||
184 | MODULE_LICENSE("GPL"); | 184 | MODULE_LICENSE("GPL"); |
185 | 185 | ||
186 | static struct net_device *dev_mvme147_lance; | 186 | static struct net_device *dev_mvme147_lance; |
187 | int init_module(void) | 187 | int __init init_module(void) |
188 | { | 188 | { |
189 | dev_mvme147_lance = mvme147lance_probe(-1); | 189 | dev_mvme147_lance = mvme147lance_probe(-1); |
190 | if (IS_ERR(dev_mvme147_lance)) | 190 | if (IS_ERR(dev_mvme147_lance)) |
@@ -192,7 +192,7 @@ int init_module(void) | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | void cleanup_module(void) | 195 | void __exit cleanup_module(void) |
196 | { | 196 | { |
197 | struct m147lance_private *lp = dev_mvme147_lance->priv; | 197 | struct m147lance_private *lp = dev_mvme147_lance->priv; |
198 | unregister_netdev(dev_mvme147_lance); | 198 | unregister_netdev(dev_mvme147_lance); |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 36350e6db1c1..d320bbeeeff6 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -89,7 +89,7 @@ MODULE_LICENSE("Dual BSD/GPL"); | |||
89 | #define MYRI10GE_EEPROM_STRINGS_SIZE 256 | 89 | #define MYRI10GE_EEPROM_STRINGS_SIZE 256 |
90 | #define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2) | 90 | #define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2) |
91 | 91 | ||
92 | #define MYRI10GE_NO_CONFIRM_DATA 0xffffffff | 92 | #define MYRI10GE_NO_CONFIRM_DATA htonl(0xffffffff) |
93 | #define MYRI10GE_NO_RESPONSE_RESULT 0xffffffff | 93 | #define MYRI10GE_NO_RESPONSE_RESULT 0xffffffff |
94 | 94 | ||
95 | struct myri10ge_rx_buffer_state { | 95 | struct myri10ge_rx_buffer_state { |
@@ -156,8 +156,8 @@ struct myri10ge_priv { | |||
156 | int sram_size; | 156 | int sram_size; |
157 | unsigned long board_span; | 157 | unsigned long board_span; |
158 | unsigned long iomem_base; | 158 | unsigned long iomem_base; |
159 | u32 __iomem *irq_claim; | 159 | __be32 __iomem *irq_claim; |
160 | u32 __iomem *irq_deassert; | 160 | __be32 __iomem *irq_deassert; |
161 | char *mac_addr_string; | 161 | char *mac_addr_string; |
162 | struct mcp_cmd_response *cmd; | 162 | struct mcp_cmd_response *cmd; |
163 | dma_addr_t cmd_bus; | 163 | dma_addr_t cmd_bus; |
@@ -165,10 +165,10 @@ struct myri10ge_priv { | |||
165 | dma_addr_t fw_stats_bus; | 165 | dma_addr_t fw_stats_bus; |
166 | struct pci_dev *pdev; | 166 | struct pci_dev *pdev; |
167 | int msi_enabled; | 167 | int msi_enabled; |
168 | unsigned int link_state; | 168 | __be32 link_state; |
169 | unsigned int rdma_tags_available; | 169 | unsigned int rdma_tags_available; |
170 | int intr_coal_delay; | 170 | int intr_coal_delay; |
171 | u32 __iomem *intr_coal_delay_ptr; | 171 | __be32 __iomem *intr_coal_delay_ptr; |
172 | int mtrr; | 172 | int mtrr; |
173 | int wake_queue; | 173 | int wake_queue; |
174 | int stop_queue; | 174 | int stop_queue; |
@@ -273,6 +273,11 @@ MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)"); | |||
273 | 273 | ||
274 | #define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8) | 274 | #define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8) |
275 | 275 | ||
276 | static inline void put_be32(__be32 val, __be32 __iomem *p) | ||
277 | { | ||
278 | __raw_writel((__force __u32)val, (__force void __iomem *)p); | ||
279 | } | ||
280 | |||
276 | static int | 281 | static int |
277 | myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, | 282 | myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, |
278 | struct myri10ge_cmd *data, int atomic) | 283 | struct myri10ge_cmd *data, int atomic) |
@@ -296,7 +301,7 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, | |||
296 | 301 | ||
297 | buf->response_addr.low = htonl(dma_low); | 302 | buf->response_addr.low = htonl(dma_low); |
298 | buf->response_addr.high = htonl(dma_high); | 303 | buf->response_addr.high = htonl(dma_high); |
299 | response->result = MYRI10GE_NO_RESPONSE_RESULT; | 304 | response->result = htonl(MYRI10GE_NO_RESPONSE_RESULT); |
300 | mb(); | 305 | mb(); |
301 | myri10ge_pio_copy(cmd_addr, buf, sizeof(*buf)); | 306 | myri10ge_pio_copy(cmd_addr, buf, sizeof(*buf)); |
302 | 307 | ||
@@ -311,14 +316,14 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, | |||
311 | * (1ms will be enough for those commands) */ | 316 | * (1ms will be enough for those commands) */ |
312 | for (sleep_total = 0; | 317 | for (sleep_total = 0; |
313 | sleep_total < 1000 | 318 | sleep_total < 1000 |
314 | && response->result == MYRI10GE_NO_RESPONSE_RESULT; | 319 | && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); |
315 | sleep_total += 10) | 320 | sleep_total += 10) |
316 | udelay(10); | 321 | udelay(10); |
317 | } else { | 322 | } else { |
318 | /* use msleep for most command */ | 323 | /* use msleep for most command */ |
319 | for (sleep_total = 0; | 324 | for (sleep_total = 0; |
320 | sleep_total < 15 | 325 | sleep_total < 15 |
321 | && response->result == MYRI10GE_NO_RESPONSE_RESULT; | 326 | && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); |
322 | sleep_total++) | 327 | sleep_total++) |
323 | msleep(1); | 328 | msleep(1); |
324 | } | 329 | } |
@@ -393,7 +398,7 @@ abort: | |||
393 | static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable) | 398 | static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable) |
394 | { | 399 | { |
395 | char __iomem *submit; | 400 | char __iomem *submit; |
396 | u32 buf[16]; | 401 | __be32 buf[16]; |
397 | u32 dma_low, dma_high; | 402 | u32 dma_low, dma_high; |
398 | int i; | 403 | int i; |
399 | 404 | ||
@@ -410,7 +415,7 @@ static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable) | |||
410 | 415 | ||
411 | buf[0] = htonl(dma_high); /* confirm addr MSW */ | 416 | buf[0] = htonl(dma_high); /* confirm addr MSW */ |
412 | buf[1] = htonl(dma_low); /* confirm addr LSW */ | 417 | buf[1] = htonl(dma_low); /* confirm addr LSW */ |
413 | buf[2] = htonl(MYRI10GE_NO_CONFIRM_DATA); /* confirm data */ | 418 | buf[2] = MYRI10GE_NO_CONFIRM_DATA; /* confirm data */ |
414 | buf[3] = htonl(dma_high); /* dummy addr MSW */ | 419 | buf[3] = htonl(dma_high); /* dummy addr MSW */ |
415 | buf[4] = htonl(dma_low); /* dummy addr LSW */ | 420 | buf[4] = htonl(dma_low); /* dummy addr LSW */ |
416 | buf[5] = htonl(enable); /* enable? */ | 421 | buf[5] = htonl(enable); /* enable? */ |
@@ -479,7 +484,7 @@ static int myri10ge_load_hotplug_firmware(struct myri10ge_priv *mgp, u32 * size) | |||
479 | } | 484 | } |
480 | 485 | ||
481 | /* check id */ | 486 | /* check id */ |
482 | hdr_offset = ntohl(*(u32 *) (fw->data + MCP_HEADER_PTR_OFFSET)); | 487 | hdr_offset = ntohl(*(__be32 *) (fw->data + MCP_HEADER_PTR_OFFSET)); |
483 | if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > fw->size) { | 488 | if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > fw->size) { |
484 | dev_err(dev, "Bad firmware file\n"); | 489 | dev_err(dev, "Bad firmware file\n"); |
485 | status = -EINVAL; | 490 | status = -EINVAL; |
@@ -550,7 +555,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) | |||
550 | static int myri10ge_load_firmware(struct myri10ge_priv *mgp) | 555 | static int myri10ge_load_firmware(struct myri10ge_priv *mgp) |
551 | { | 556 | { |
552 | char __iomem *submit; | 557 | char __iomem *submit; |
553 | u32 buf[16]; | 558 | __be32 buf[16]; |
554 | u32 dma_low, dma_high, size; | 559 | u32 dma_low, dma_high, size; |
555 | int status, i; | 560 | int status, i; |
556 | 561 | ||
@@ -600,7 +605,7 @@ static int myri10ge_load_firmware(struct myri10ge_priv *mgp) | |||
600 | 605 | ||
601 | buf[0] = htonl(dma_high); /* confirm addr MSW */ | 606 | buf[0] = htonl(dma_high); /* confirm addr MSW */ |
602 | buf[1] = htonl(dma_low); /* confirm addr LSW */ | 607 | buf[1] = htonl(dma_low); /* confirm addr LSW */ |
603 | buf[2] = htonl(MYRI10GE_NO_CONFIRM_DATA); /* confirm data */ | 608 | buf[2] = MYRI10GE_NO_CONFIRM_DATA; /* confirm data */ |
604 | 609 | ||
605 | /* FIX: All newest firmware should un-protect the bottom of | 610 | /* FIX: All newest firmware should un-protect the bottom of |
606 | * the sram before handoff. However, the very first interfaces | 611 | * the sram before handoff. However, the very first interfaces |
@@ -705,21 +710,21 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
705 | 710 | ||
706 | status |= | 711 | status |= |
707 | myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_IRQ_ACK_OFFSET, &cmd, 0); | 712 | myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_IRQ_ACK_OFFSET, &cmd, 0); |
708 | mgp->irq_claim = (__iomem u32 *) (mgp->sram + cmd.data0); | 713 | mgp->irq_claim = (__iomem __be32 *) (mgp->sram + cmd.data0); |
709 | if (!mgp->msi_enabled) { | 714 | if (!mgp->msi_enabled) { |
710 | status |= myri10ge_send_cmd | 715 | status |= myri10ge_send_cmd |
711 | (mgp, MXGEFW_CMD_GET_IRQ_DEASSERT_OFFSET, &cmd, 0); | 716 | (mgp, MXGEFW_CMD_GET_IRQ_DEASSERT_OFFSET, &cmd, 0); |
712 | mgp->irq_deassert = (__iomem u32 *) (mgp->sram + cmd.data0); | 717 | mgp->irq_deassert = (__iomem __be32 *) (mgp->sram + cmd.data0); |
713 | 718 | ||
714 | } | 719 | } |
715 | status |= myri10ge_send_cmd | 720 | status |= myri10ge_send_cmd |
716 | (mgp, MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, &cmd, 0); | 721 | (mgp, MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, &cmd, 0); |
717 | mgp->intr_coal_delay_ptr = (__iomem u32 *) (mgp->sram + cmd.data0); | 722 | mgp->intr_coal_delay_ptr = (__iomem __be32 *) (mgp->sram + cmd.data0); |
718 | if (status != 0) { | 723 | if (status != 0) { |
719 | dev_err(&mgp->pdev->dev, "failed set interrupt parameters\n"); | 724 | dev_err(&mgp->pdev->dev, "failed set interrupt parameters\n"); |
720 | return status; | 725 | return status; |
721 | } | 726 | } |
722 | __raw_writel(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); | 727 | put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); |
723 | 728 | ||
724 | /* Run a small DMA test. | 729 | /* Run a small DMA test. |
725 | * The magic multipliers to the length tell the firmware | 730 | * The magic multipliers to the length tell the firmware |
@@ -786,14 +791,14 @@ static inline void | |||
786 | myri10ge_submit_8rx(struct mcp_kreq_ether_recv __iomem * dst, | 791 | myri10ge_submit_8rx(struct mcp_kreq_ether_recv __iomem * dst, |
787 | struct mcp_kreq_ether_recv *src) | 792 | struct mcp_kreq_ether_recv *src) |
788 | { | 793 | { |
789 | u32 low; | 794 | __be32 low; |
790 | 795 | ||
791 | low = src->addr_low; | 796 | low = src->addr_low; |
792 | src->addr_low = DMA_32BIT_MASK; | 797 | src->addr_low = htonl(DMA_32BIT_MASK); |
793 | myri10ge_pio_copy(dst, src, 8 * sizeof(*src)); | 798 | myri10ge_pio_copy(dst, src, 8 * sizeof(*src)); |
794 | mb(); | 799 | mb(); |
795 | src->addr_low = low; | 800 | src->addr_low = low; |
796 | __raw_writel(low, &dst->addr_low); | 801 | put_be32(low, &dst->addr_low); |
797 | mb(); | 802 | mb(); |
798 | } | 803 | } |
799 | 804 | ||
@@ -939,11 +944,11 @@ done: | |||
939 | return retval; | 944 | return retval; |
940 | } | 945 | } |
941 | 946 | ||
942 | static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, u16 hw_csum) | 947 | static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, __wsum hw_csum) |
943 | { | 948 | { |
944 | struct vlan_hdr *vh = (struct vlan_hdr *)(skb->data); | 949 | struct vlan_hdr *vh = (struct vlan_hdr *)(skb->data); |
945 | 950 | ||
946 | if ((skb->protocol == ntohs(ETH_P_8021Q)) && | 951 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
947 | (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) || | 952 | (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) || |
948 | vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) { | 953 | vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) { |
949 | skb->csum = hw_csum; | 954 | skb->csum = hw_csum; |
@@ -953,7 +958,7 @@ static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, u16 hw_csum) | |||
953 | 958 | ||
954 | static inline unsigned long | 959 | static inline unsigned long |
955 | myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, | 960 | myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, |
956 | int bytes, int len, int csum) | 961 | int bytes, int len, __wsum csum) |
957 | { | 962 | { |
958 | dma_addr_t bus; | 963 | dma_addr_t bus; |
959 | struct sk_buff *skb; | 964 | struct sk_buff *skb; |
@@ -986,12 +991,12 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, | |||
986 | 991 | ||
987 | skb->protocol = eth_type_trans(skb, mgp->dev); | 992 | skb->protocol = eth_type_trans(skb, mgp->dev); |
988 | if (mgp->csum_flag) { | 993 | if (mgp->csum_flag) { |
989 | if ((skb->protocol == ntohs(ETH_P_IP)) || | 994 | if ((skb->protocol == htons(ETH_P_IP)) || |
990 | (skb->protocol == ntohs(ETH_P_IPV6))) { | 995 | (skb->protocol == htons(ETH_P_IPV6))) { |
991 | skb->csum = ntohs((u16) csum); | 996 | skb->csum = csum; |
992 | skb->ip_summed = CHECKSUM_COMPLETE; | 997 | skb->ip_summed = CHECKSUM_COMPLETE; |
993 | } else | 998 | } else |
994 | myri10ge_vlan_ip_csum(skb, ntohs((u16) csum)); | 999 | myri10ge_vlan_ip_csum(skb, csum); |
995 | } | 1000 | } |
996 | 1001 | ||
997 | netif_receive_skb(skb); | 1002 | netif_receive_skb(skb); |
@@ -1060,12 +1065,12 @@ static inline void myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int *limit) | |||
1060 | int idx = rx_done->idx; | 1065 | int idx = rx_done->idx; |
1061 | int cnt = rx_done->cnt; | 1066 | int cnt = rx_done->cnt; |
1062 | u16 length; | 1067 | u16 length; |
1063 | u16 checksum; | 1068 | __wsum checksum; |
1064 | 1069 | ||
1065 | while (rx_done->entry[idx].length != 0 && *limit != 0) { | 1070 | while (rx_done->entry[idx].length != 0 && *limit != 0) { |
1066 | length = ntohs(rx_done->entry[idx].length); | 1071 | length = ntohs(rx_done->entry[idx].length); |
1067 | rx_done->entry[idx].length = 0; | 1072 | rx_done->entry[idx].length = 0; |
1068 | checksum = ntohs(rx_done->entry[idx].checksum); | 1073 | checksum = csum_unfold(rx_done->entry[idx].checksum); |
1069 | if (length <= mgp->small_bytes) | 1074 | if (length <= mgp->small_bytes) |
1070 | rx_ok = myri10ge_rx_done(mgp, &mgp->rx_small, | 1075 | rx_ok = myri10ge_rx_done(mgp, &mgp->rx_small, |
1071 | mgp->small_bytes, | 1076 | mgp->small_bytes, |
@@ -1142,7 +1147,7 @@ static int myri10ge_poll(struct net_device *netdev, int *budget) | |||
1142 | 1147 | ||
1143 | if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) { | 1148 | if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) { |
1144 | netif_rx_complete(netdev); | 1149 | netif_rx_complete(netdev); |
1145 | __raw_writel(htonl(3), mgp->irq_claim); | 1150 | put_be32(htonl(3), mgp->irq_claim); |
1146 | return 0; | 1151 | return 0; |
1147 | } | 1152 | } |
1148 | return 1; | 1153 | return 1; |
@@ -1166,7 +1171,7 @@ static irqreturn_t myri10ge_intr(int irq, void *arg) | |||
1166 | netif_rx_schedule(mgp->dev); | 1171 | netif_rx_schedule(mgp->dev); |
1167 | 1172 | ||
1168 | if (!mgp->msi_enabled) { | 1173 | if (!mgp->msi_enabled) { |
1169 | __raw_writel(0, mgp->irq_deassert); | 1174 | put_be32(0, mgp->irq_deassert); |
1170 | if (!myri10ge_deassert_wait) | 1175 | if (!myri10ge_deassert_wait) |
1171 | stats->valid = 0; | 1176 | stats->valid = 0; |
1172 | mb(); | 1177 | mb(); |
@@ -1195,7 +1200,7 @@ static irqreturn_t myri10ge_intr(int irq, void *arg) | |||
1195 | 1200 | ||
1196 | myri10ge_check_statblock(mgp); | 1201 | myri10ge_check_statblock(mgp); |
1197 | 1202 | ||
1198 | __raw_writel(htonl(3), mgp->irq_claim + 1); | 1203 | put_be32(htonl(3), mgp->irq_claim + 1); |
1199 | return (IRQ_HANDLED); | 1204 | return (IRQ_HANDLED); |
1200 | } | 1205 | } |
1201 | 1206 | ||
@@ -1233,7 +1238,7 @@ myri10ge_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coal) | |||
1233 | struct myri10ge_priv *mgp = netdev_priv(netdev); | 1238 | struct myri10ge_priv *mgp = netdev_priv(netdev); |
1234 | 1239 | ||
1235 | mgp->intr_coal_delay = coal->rx_coalesce_usecs; | 1240 | mgp->intr_coal_delay = coal->rx_coalesce_usecs; |
1236 | __raw_writel(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); | 1241 | put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); |
1237 | return 0; | 1242 | return 0; |
1238 | } | 1243 | } |
1239 | 1244 | ||
@@ -1748,7 +1753,7 @@ static int myri10ge_open(struct net_device *dev) | |||
1748 | goto abort_with_rings; | 1753 | goto abort_with_rings; |
1749 | } | 1754 | } |
1750 | 1755 | ||
1751 | mgp->link_state = -1; | 1756 | mgp->link_state = htonl(~0U); |
1752 | mgp->rdma_tags_available = 15; | 1757 | mgp->rdma_tags_available = 15; |
1753 | 1758 | ||
1754 | netif_poll_enable(mgp->dev); /* must happen prior to any irq */ | 1759 | netif_poll_enable(mgp->dev); /* must happen prior to any irq */ |
@@ -1876,7 +1881,7 @@ myri10ge_submit_req(struct myri10ge_tx_buf *tx, struct mcp_kreq_ether_send *src, | |||
1876 | 1881 | ||
1877 | /* re-write the last 32-bits with the valid flags */ | 1882 | /* re-write the last 32-bits with the valid flags */ |
1878 | src->flags = last_flags; | 1883 | src->flags = last_flags; |
1879 | __raw_writel(*((u32 *) src + 3), (u32 __iomem *) dst + 3); | 1884 | put_be32(*((__be32 *) src + 3), (__be32 __iomem *) dst + 3); |
1880 | tx->req += cnt; | 1885 | tx->req += cnt; |
1881 | mb(); | 1886 | mb(); |
1882 | } | 1887 | } |
@@ -1919,7 +1924,8 @@ static int myri10ge_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1919 | struct myri10ge_tx_buf *tx = &mgp->tx; | 1924 | struct myri10ge_tx_buf *tx = &mgp->tx; |
1920 | struct skb_frag_struct *frag; | 1925 | struct skb_frag_struct *frag; |
1921 | dma_addr_t bus; | 1926 | dma_addr_t bus; |
1922 | u32 low, high_swapped; | 1927 | u32 low; |
1928 | __be32 high_swapped; | ||
1923 | unsigned int len; | 1929 | unsigned int len; |
1924 | int idx, last_idx, avail, frag_cnt, frag_idx, count, mss, max_segments; | 1930 | int idx, last_idx, avail, frag_cnt, frag_idx, count, mss, max_segments; |
1925 | u16 pseudo_hdr_offset, cksum_offset; | 1931 | u16 pseudo_hdr_offset, cksum_offset; |
@@ -1964,7 +1970,6 @@ again: | |||
1964 | cksum_offset = 0; | 1970 | cksum_offset = 0; |
1965 | pseudo_hdr_offset = 0; | 1971 | pseudo_hdr_offset = 0; |
1966 | } else { | 1972 | } else { |
1967 | pseudo_hdr_offset = htons(pseudo_hdr_offset); | ||
1968 | odd_flag = MXGEFW_FLAGS_ALIGN_ODD; | 1973 | odd_flag = MXGEFW_FLAGS_ALIGN_ODD; |
1969 | flags |= MXGEFW_FLAGS_CKSUM; | 1974 | flags |= MXGEFW_FLAGS_CKSUM; |
1970 | } | 1975 | } |
@@ -1986,7 +1991,7 @@ again: | |||
1986 | /* for TSO, pseudo_hdr_offset holds mss. | 1991 | /* for TSO, pseudo_hdr_offset holds mss. |
1987 | * The firmware figures out where to put | 1992 | * The firmware figures out where to put |
1988 | * the checksum by parsing the header. */ | 1993 | * the checksum by parsing the header. */ |
1989 | pseudo_hdr_offset = htons(mss); | 1994 | pseudo_hdr_offset = mss; |
1990 | } else | 1995 | } else |
1991 | #endif /*NETIF_F_TSO */ | 1996 | #endif /*NETIF_F_TSO */ |
1992 | /* Mark small packets, and pad out tiny packets */ | 1997 | /* Mark small packets, and pad out tiny packets */ |
@@ -2086,7 +2091,7 @@ again: | |||
2086 | #endif /* NETIF_F_TSO */ | 2091 | #endif /* NETIF_F_TSO */ |
2087 | req->addr_high = high_swapped; | 2092 | req->addr_high = high_swapped; |
2088 | req->addr_low = htonl(low); | 2093 | req->addr_low = htonl(low); |
2089 | req->pseudo_hdr_offset = pseudo_hdr_offset; | 2094 | req->pseudo_hdr_offset = htons(pseudo_hdr_offset); |
2090 | req->pad = 0; /* complete solid 16-byte block; does this matter? */ | 2095 | req->pad = 0; /* complete solid 16-byte block; does this matter? */ |
2091 | req->rdma_count = 1; | 2096 | req->rdma_count = 1; |
2092 | req->length = htons(seglen); | 2097 | req->length = htons(seglen); |
@@ -2199,6 +2204,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev) | |||
2199 | struct myri10ge_cmd cmd; | 2204 | struct myri10ge_cmd cmd; |
2200 | struct myri10ge_priv *mgp; | 2205 | struct myri10ge_priv *mgp; |
2201 | struct dev_mc_list *mc_list; | 2206 | struct dev_mc_list *mc_list; |
2207 | __be32 data[2] = {0, 0}; | ||
2202 | int err; | 2208 | int err; |
2203 | 2209 | ||
2204 | mgp = netdev_priv(dev); | 2210 | mgp = netdev_priv(dev); |
@@ -2237,10 +2243,9 @@ static void myri10ge_set_multicast_list(struct net_device *dev) | |||
2237 | 2243 | ||
2238 | /* Walk the multicast list, and add each address */ | 2244 | /* Walk the multicast list, and add each address */ |
2239 | for (mc_list = dev->mc_list; mc_list != NULL; mc_list = mc_list->next) { | 2245 | for (mc_list = dev->mc_list; mc_list != NULL; mc_list = mc_list->next) { |
2240 | memcpy(&cmd.data0, &mc_list->dmi_addr, 4); | 2246 | memcpy(data, &mc_list->dmi_addr, 6); |
2241 | memcpy(&cmd.data1, ((char *)&mc_list->dmi_addr) + 4, 2); | 2247 | cmd.data0 = ntohl(data[0]); |
2242 | cmd.data0 = htonl(cmd.data0); | 2248 | cmd.data1 = ntohl(data[1]); |
2243 | cmd.data1 = htonl(cmd.data1); | ||
2244 | err = myri10ge_send_cmd(mgp, MXGEFW_JOIN_MULTICAST_GROUP, | 2249 | err = myri10ge_send_cmd(mgp, MXGEFW_JOIN_MULTICAST_GROUP, |
2245 | &cmd, 1); | 2250 | &cmd, 1); |
2246 | 2251 | ||
diff --git a/drivers/net/myri10ge/myri10ge_mcp.h b/drivers/net/myri10ge/myri10ge_mcp.h index 9519ae7cd5ec..29463b301a84 100644 --- a/drivers/net/myri10ge/myri10ge_mcp.h +++ b/drivers/net/myri10ge/myri10ge_mcp.h | |||
@@ -6,23 +6,23 @@ | |||
6 | 6 | ||
7 | /* 8 Bytes */ | 7 | /* 8 Bytes */ |
8 | struct mcp_dma_addr { | 8 | struct mcp_dma_addr { |
9 | u32 high; | 9 | __be32 high; |
10 | u32 low; | 10 | __be32 low; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | /* 4 Bytes */ | 13 | /* 4 Bytes */ |
14 | struct mcp_slot { | 14 | struct mcp_slot { |
15 | u16 checksum; | 15 | __sum16 checksum; |
16 | u16 length; | 16 | __be16 length; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | /* 64 Bytes */ | 19 | /* 64 Bytes */ |
20 | struct mcp_cmd { | 20 | struct mcp_cmd { |
21 | u32 cmd; | 21 | __be32 cmd; |
22 | u32 data0; /* will be low portion if data > 32 bits */ | 22 | __be32 data0; /* will be low portion if data > 32 bits */ |
23 | /* 8 */ | 23 | /* 8 */ |
24 | u32 data1; /* will be high portion if data > 32 bits */ | 24 | __be32 data1; /* will be high portion if data > 32 bits */ |
25 | u32 data2; /* currently unused.. */ | 25 | __be32 data2; /* currently unused.. */ |
26 | /* 16 */ | 26 | /* 16 */ |
27 | struct mcp_dma_addr response_addr; | 27 | struct mcp_dma_addr response_addr; |
28 | /* 24 */ | 28 | /* 24 */ |
@@ -31,8 +31,8 @@ struct mcp_cmd { | |||
31 | 31 | ||
32 | /* 8 Bytes */ | 32 | /* 8 Bytes */ |
33 | struct mcp_cmd_response { | 33 | struct mcp_cmd_response { |
34 | u32 data; | 34 | __be32 data; |
35 | u32 result; | 35 | __be32 result; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | 38 | /* |
@@ -73,10 +73,10 @@ union mcp_pso_or_cumlen { | |||
73 | 73 | ||
74 | /* 16 Bytes */ | 74 | /* 16 Bytes */ |
75 | struct mcp_kreq_ether_send { | 75 | struct mcp_kreq_ether_send { |
76 | u32 addr_high; | 76 | __be32 addr_high; |
77 | u32 addr_low; | 77 | __be32 addr_low; |
78 | u16 pseudo_hdr_offset; | 78 | __be16 pseudo_hdr_offset; |
79 | u16 length; | 79 | __be16 length; |
80 | u8 pad; | 80 | u8 pad; |
81 | u8 rdma_count; | 81 | u8 rdma_count; |
82 | u8 cksum_offset; /* where to start computing cksum */ | 82 | u8 cksum_offset; /* where to start computing cksum */ |
@@ -85,8 +85,8 @@ struct mcp_kreq_ether_send { | |||
85 | 85 | ||
86 | /* 8 Bytes */ | 86 | /* 8 Bytes */ |
87 | struct mcp_kreq_ether_recv { | 87 | struct mcp_kreq_ether_recv { |
88 | u32 addr_high; | 88 | __be32 addr_high; |
89 | u32 addr_low; | 89 | __be32 addr_low; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | /* Commands */ | 92 | /* Commands */ |
@@ -219,19 +219,19 @@ enum myri10ge_mcp_cmd_status { | |||
219 | 219 | ||
220 | struct mcp_irq_data { | 220 | struct mcp_irq_data { |
221 | /* add new counters at the beginning */ | 221 | /* add new counters at the beginning */ |
222 | u32 future_use[5]; | 222 | __be32 future_use[5]; |
223 | u32 dropped_multicast_filtered; | 223 | __be32 dropped_multicast_filtered; |
224 | /* 40 Bytes */ | 224 | /* 40 Bytes */ |
225 | u32 send_done_count; | 225 | __be32 send_done_count; |
226 | 226 | ||
227 | u32 link_up; | 227 | __be32 link_up; |
228 | u32 dropped_link_overflow; | 228 | __be32 dropped_link_overflow; |
229 | u32 dropped_link_error_or_filtered; | 229 | __be32 dropped_link_error_or_filtered; |
230 | u32 dropped_runt; | 230 | __be32 dropped_runt; |
231 | u32 dropped_overrun; | 231 | __be32 dropped_overrun; |
232 | u32 dropped_no_small_buffer; | 232 | __be32 dropped_no_small_buffer; |
233 | u32 dropped_no_big_buffer; | 233 | __be32 dropped_no_big_buffer; |
234 | u32 rdma_tags_available; | 234 | __be32 rdma_tags_available; |
235 | 235 | ||
236 | u8 tx_stopped; | 236 | u8 tx_stopped; |
237 | u8 link_down; | 237 | u8 link_down; |
diff --git a/drivers/net/myri10ge/myri10ge_mcp_gen_header.h b/drivers/net/myri10ge/myri10ge_mcp_gen_header.h index 487f7792fd46..16a810dd6d51 100644 --- a/drivers/net/myri10ge/myri10ge_mcp_gen_header.h +++ b/drivers/net/myri10ge/myri10ge_mcp_gen_header.h | |||
@@ -36,7 +36,7 @@ | |||
36 | struct mcp_gen_header { | 36 | struct mcp_gen_header { |
37 | /* the first 4 fields are filled at compile time */ | 37 | /* the first 4 fields are filled at compile time */ |
38 | unsigned header_length; | 38 | unsigned header_length; |
39 | unsigned mcp_type; | 39 | __be32 mcp_type; |
40 | char version[128]; | 40 | char version[128]; |
41 | unsigned mcp_globals; /* pointer to mcp-type specific structure */ | 41 | unsigned mcp_globals; /* pointer to mcp-type specific structure */ |
42 | 42 | ||
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index 787aa4221528..a5c4199e2754 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -867,7 +867,7 @@ static void cleanup_card(struct net_device *dev) | |||
867 | release_region(dev->base_addr, NE_IO_EXTENT); | 867 | release_region(dev->base_addr, NE_IO_EXTENT); |
868 | } | 868 | } |
869 | 869 | ||
870 | void cleanup_module(void) | 870 | void __exit cleanup_module(void) |
871 | { | 871 | { |
872 | int this_dev; | 872 | int this_dev; |
873 | 873 | ||
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c index 5fccfea66d87..089b5bb702fc 100644 --- a/drivers/net/ne2.c +++ b/drivers/net/ne2.c | |||
@@ -813,7 +813,7 @@ static void cleanup_card(struct net_device *dev) | |||
813 | release_region(dev->base_addr, NE_IO_EXTENT); | 813 | release_region(dev->base_addr, NE_IO_EXTENT); |
814 | } | 814 | } |
815 | 815 | ||
816 | void cleanup_module(void) | 816 | void __exit cleanup_module(void) |
817 | { | 817 | { |
818 | int this_dev; | 818 | int this_dev; |
819 | 819 | ||
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index 26e42f6e9fb1..196993a29b09 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -1335,7 +1335,7 @@ int __init init_module(void) | |||
1335 | return 0; | 1335 | return 0; |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | void cleanup_module(void) | 1338 | void __exit cleanup_module(void) |
1339 | { | 1339 | { |
1340 | unregister_netdev(dev_ni52); | 1340 | unregister_netdev(dev_ni52); |
1341 | release_region(dev_ni52->base_addr, NI52_TOTAL_SIZE); | 1341 | release_region(dev_ni52->base_addr, NI52_TOTAL_SIZE); |
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c index 340ad0d5388a..1578f4d98498 100644 --- a/drivers/net/ni65.c +++ b/drivers/net/ni65.c | |||
@@ -1259,7 +1259,7 @@ int __init init_module(void) | |||
1259 | return IS_ERR(dev_ni65) ? PTR_ERR(dev_ni65) : 0; | 1259 | return IS_ERR(dev_ni65) ? PTR_ERR(dev_ni65) : 0; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | void cleanup_module(void) | 1262 | void __exit cleanup_module(void) |
1263 | { | 1263 | { |
1264 | unregister_netdev(dev_ni65); | 1264 | unregister_netdev(dev_ni65); |
1265 | cleanup_card(dev_ni65); | 1265 | cleanup_card(dev_ni65); |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index b0127c71a5b6..eb0e119bc0d6 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -414,10 +414,10 @@ struct rx_info { | |||
414 | 414 | ||
415 | struct sk_buff *skbs[NR_RX_DESC]; | 415 | struct sk_buff *skbs[NR_RX_DESC]; |
416 | 416 | ||
417 | u32 *next_rx_desc; | 417 | __le32 *next_rx_desc; |
418 | u16 next_rx, next_empty; | 418 | u16 next_rx, next_empty; |
419 | 419 | ||
420 | u32 *descs; | 420 | __le32 *descs; |
421 | dma_addr_t phy_descs; | 421 | dma_addr_t phy_descs; |
422 | }; | 422 | }; |
423 | 423 | ||
@@ -459,7 +459,7 @@ struct ns83820 { | |||
459 | struct sk_buff *tx_skbs[NR_TX_DESC]; | 459 | struct sk_buff *tx_skbs[NR_TX_DESC]; |
460 | 460 | ||
461 | char pad[16] __attribute__((aligned(16))); | 461 | char pad[16] __attribute__((aligned(16))); |
462 | u32 *tx_descs; | 462 | __le32 *tx_descs; |
463 | dma_addr_t tx_phy_descs; | 463 | dma_addr_t tx_phy_descs; |
464 | 464 | ||
465 | struct timer_list tx_watchdog; | 465 | struct timer_list tx_watchdog; |
@@ -533,7 +533,7 @@ static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid | |||
533 | * conditions, still route realtime traffic with as low jitter as | 533 | * conditions, still route realtime traffic with as low jitter as |
534 | * possible. | 534 | * possible. |
535 | */ | 535 | */ |
536 | static inline void build_rx_desc(struct ns83820 *dev, u32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts) | 536 | static inline void build_rx_desc(struct ns83820 *dev, __le32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts) |
537 | { | 537 | { |
538 | desc_addr_set(desc + DESC_LINK, link); | 538 | desc_addr_set(desc + DESC_LINK, link); |
539 | desc_addr_set(desc + DESC_BUFPTR, buf); | 539 | desc_addr_set(desc + DESC_BUFPTR, buf); |
@@ -547,7 +547,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb) | |||
547 | { | 547 | { |
548 | unsigned next_empty; | 548 | unsigned next_empty; |
549 | u32 cmdsts; | 549 | u32 cmdsts; |
550 | u32 *sg; | 550 | __le32 *sg; |
551 | dma_addr_t buf; | 551 | dma_addr_t buf; |
552 | 552 | ||
553 | next_empty = dev->rx_info.next_empty; | 553 | next_empty = dev->rx_info.next_empty; |
@@ -874,7 +874,8 @@ static void fastcall rx_irq(struct net_device *ndev) | |||
874 | struct rx_info *info = &dev->rx_info; | 874 | struct rx_info *info = &dev->rx_info; |
875 | unsigned next_rx; | 875 | unsigned next_rx; |
876 | int rx_rc, len; | 876 | int rx_rc, len; |
877 | u32 cmdsts, *desc; | 877 | u32 cmdsts; |
878 | __le32 *desc; | ||
878 | unsigned long flags; | 879 | unsigned long flags; |
879 | int nr = 0; | 880 | int nr = 0; |
880 | 881 | ||
@@ -1010,7 +1011,8 @@ static inline void kick_tx(struct ns83820 *dev) | |||
1010 | static void do_tx_done(struct net_device *ndev) | 1011 | static void do_tx_done(struct net_device *ndev) |
1011 | { | 1012 | { |
1012 | struct ns83820 *dev = PRIV(ndev); | 1013 | struct ns83820 *dev = PRIV(ndev); |
1013 | u32 cmdsts, tx_done_idx, *desc; | 1014 | u32 cmdsts, tx_done_idx; |
1015 | __le32 *desc; | ||
1014 | 1016 | ||
1015 | dprintk("do_tx_done(%p)\n", ndev); | 1017 | dprintk("do_tx_done(%p)\n", ndev); |
1016 | tx_done_idx = dev->tx_done_idx; | 1018 | tx_done_idx = dev->tx_done_idx; |
@@ -1077,7 +1079,7 @@ static void ns83820_cleanup_tx(struct ns83820 *dev) | |||
1077 | struct sk_buff *skb = dev->tx_skbs[i]; | 1079 | struct sk_buff *skb = dev->tx_skbs[i]; |
1078 | dev->tx_skbs[i] = NULL; | 1080 | dev->tx_skbs[i] = NULL; |
1079 | if (skb) { | 1081 | if (skb) { |
1080 | u32 *desc = dev->tx_descs + (i * DESC_SIZE); | 1082 | __le32 *desc = dev->tx_descs + (i * DESC_SIZE); |
1081 | pci_unmap_single(dev->pci_dev, | 1083 | pci_unmap_single(dev->pci_dev, |
1082 | desc_addr_get(desc + DESC_BUFPTR), | 1084 | desc_addr_get(desc + DESC_BUFPTR), |
1083 | le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK, | 1085 | le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK, |
@@ -1107,7 +1109,7 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1107 | skb_frag_t *frag; | 1109 | skb_frag_t *frag; |
1108 | int stopped = 0; | 1110 | int stopped = 0; |
1109 | int do_intr = 0; | 1111 | int do_intr = 0; |
1110 | volatile u32 *first_desc; | 1112 | volatile __le32 *first_desc; |
1111 | 1113 | ||
1112 | dprintk("ns83820_hard_start_xmit\n"); | 1114 | dprintk("ns83820_hard_start_xmit\n"); |
1113 | 1115 | ||
@@ -1180,7 +1182,7 @@ again: | |||
1180 | first_desc = dev->tx_descs + (free_idx * DESC_SIZE); | 1182 | first_desc = dev->tx_descs + (free_idx * DESC_SIZE); |
1181 | 1183 | ||
1182 | for (;;) { | 1184 | for (;;) { |
1183 | volatile u32 *desc = dev->tx_descs + (free_idx * DESC_SIZE); | 1185 | volatile __le32 *desc = dev->tx_descs + (free_idx * DESC_SIZE); |
1184 | 1186 | ||
1185 | dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len, | 1187 | dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len, |
1186 | (unsigned long long)buf); | 1188 | (unsigned long long)buf); |
@@ -1455,7 +1457,8 @@ static int ns83820_stop(struct net_device *ndev) | |||
1455 | static void ns83820_tx_timeout(struct net_device *ndev) | 1457 | static void ns83820_tx_timeout(struct net_device *ndev) |
1456 | { | 1458 | { |
1457 | struct ns83820 *dev = PRIV(ndev); | 1459 | struct ns83820 *dev = PRIV(ndev); |
1458 | u32 tx_done_idx, *desc; | 1460 | u32 tx_done_idx; |
1461 | __le32 *desc; | ||
1459 | unsigned long flags; | 1462 | unsigned long flags; |
1460 | 1463 | ||
1461 | spin_lock_irqsave(&dev->tx_lock, flags); | 1464 | spin_lock_irqsave(&dev->tx_lock, flags); |
diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c index d9d0a3a3c558..0d6c95c7aedf 100644 --- a/drivers/net/seeq8005.c +++ b/drivers/net/seeq8005.c | |||
@@ -750,7 +750,7 @@ int __init init_module(void) | |||
750 | return 0; | 750 | return 0; |
751 | } | 751 | } |
752 | 752 | ||
753 | void cleanup_module(void) | 753 | void __exit cleanup_module(void) |
754 | { | 754 | { |
755 | unregister_netdev(dev_seeq); | 755 | unregister_netdev(dev_seeq); |
756 | release_region(dev_seeq->base_addr, SEEQ8005_IO_EXTENT); | 756 | release_region(dev_seeq->base_addr, SEEQ8005_IO_EXTENT); |
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index 889ef0d7c374..d70bc9795346 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c | |||
@@ -593,7 +593,7 @@ static void cleanup_card(struct net_device *dev) | |||
593 | iounmap(ei_status.mem); | 593 | iounmap(ei_status.mem); |
594 | } | 594 | } |
595 | 595 | ||
596 | void | 596 | void __exit |
597 | cleanup_module(void) | 597 | cleanup_module(void) |
598 | { | 598 | { |
599 | int this_dev; | 599 | int this_dev; |
diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c index e10755ec5def..2c5319c62fa5 100644 --- a/drivers/net/smc-ultra32.c +++ b/drivers/net/smc-ultra32.c | |||
@@ -437,7 +437,7 @@ int __init init_module(void) | |||
437 | return -ENXIO; | 437 | return -ENXIO; |
438 | } | 438 | } |
439 | 439 | ||
440 | void cleanup_module(void) | 440 | void __exit cleanup_module(void) |
441 | { | 441 | { |
442 | int this_dev; | 442 | int this_dev; |
443 | 443 | ||
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index c0d13d650913..bd6e84506c29 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -1616,7 +1616,7 @@ int __init init_module(void) | |||
1616 | return 0; | 1616 | return 0; |
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | void cleanup_module(void) | 1619 | void __exit cleanup_module(void) |
1620 | { | 1620 | { |
1621 | unregister_netdev(devSMC9194); | 1621 | unregister_netdev(devSMC9194); |
1622 | free_irq(devSMC9194->irq, devSMC9194); | 1622 | free_irq(devSMC9194->irq, devSMC9194); |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index a8640169fc77..9e0fbc59114f 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -1216,7 +1216,7 @@ static const char * chip_ids[ 16 ] = { | |||
1216 | if (SMC_CAN_USE_32BIT) { \ | 1216 | if (SMC_CAN_USE_32BIT) { \ |
1217 | void *__ptr = (p); \ | 1217 | void *__ptr = (p); \ |
1218 | int __len = (l); \ | 1218 | int __len = (l); \ |
1219 | void *__ioaddr = ioaddr; \ | 1219 | void __iomem *__ioaddr = ioaddr; \ |
1220 | if (__len >= 2 && (unsigned long)__ptr & 2) { \ | 1220 | if (__len >= 2 && (unsigned long)__ptr & 2) { \ |
1221 | __len -= 2; \ | 1221 | __len -= 2; \ |
1222 | SMC_outw(*(u16 *)__ptr, ioaddr, DATA_REG); \ | 1222 | SMC_outw(*(u16 *)__ptr, ioaddr, DATA_REG); \ |
@@ -1240,7 +1240,7 @@ static const char * chip_ids[ 16 ] = { | |||
1240 | if (SMC_CAN_USE_32BIT) { \ | 1240 | if (SMC_CAN_USE_32BIT) { \ |
1241 | void *__ptr = (p); \ | 1241 | void *__ptr = (p); \ |
1242 | int __len = (l); \ | 1242 | int __len = (l); \ |
1243 | void *__ioaddr = ioaddr; \ | 1243 | void __iomem *__ioaddr = ioaddr; \ |
1244 | if ((unsigned long)__ptr & 2) { \ | 1244 | if ((unsigned long)__ptr & 2) { \ |
1245 | /* \ | 1245 | /* \ |
1246 | * We want 32bit alignment here. \ | 1246 | * We want 32bit alignment here. \ |
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 47a1c09d19ac..c62e85d89f41 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -945,7 +945,7 @@ static void set_multicast_list( struct net_device *dev ) | |||
945 | 945 | ||
946 | static struct net_device *sun3lance_dev; | 946 | static struct net_device *sun3lance_dev; |
947 | 947 | ||
948 | int init_module(void) | 948 | int __init init_module(void) |
949 | { | 949 | { |
950 | sun3lance_dev = sun3lance_probe(-1); | 950 | sun3lance_dev = sun3lance_probe(-1); |
951 | if (IS_ERR(sun3lance_dev)) | 951 | if (IS_ERR(sun3lance_dev)) |
@@ -953,7 +953,7 @@ int init_module(void) | |||
953 | return 0; | 953 | return 0; |
954 | } | 954 | } |
955 | 955 | ||
956 | void cleanup_module(void) | 956 | void __exit cleanup_module(void) |
957 | { | 957 | { |
958 | unregister_netdev(sun3lance_dev); | 958 | unregister_netdev(sun3lance_dev); |
959 | #ifdef CONFIG_SUN3 | 959 | #ifdef CONFIG_SUN3 |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 46dabdb12071..cec282a6f62d 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -5706,7 +5706,7 @@ int __init init_module(void) | |||
5706 | return found ? 0 : -ENODEV; | 5706 | return found ? 0 : -ENODEV; |
5707 | } | 5707 | } |
5708 | 5708 | ||
5709 | void cleanup_module(void) | 5709 | void __exit cleanup_module(void) |
5710 | { | 5710 | { |
5711 | int i; | 5711 | int i; |
5712 | 5712 | ||
diff --git a/drivers/net/wd.c b/drivers/net/wd.c index 41f1d6778849..7f38012b9c92 100644 --- a/drivers/net/wd.c +++ b/drivers/net/wd.c | |||
@@ -538,7 +538,7 @@ static void cleanup_card(struct net_device *dev) | |||
538 | iounmap(ei_status.mem); | 538 | iounmap(ei_status.mem); |
539 | } | 539 | } |
540 | 540 | ||
541 | void | 541 | void __exit |
542 | cleanup_module(void) | 542 | cleanup_module(void) |
543 | { | 543 | { |
544 | int this_dev; | 544 | int this_dev; |