aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bmac.c7
-rw-r--r--drivers/net/hamradio/scc.c5
-rw-r--r--drivers/net/mace.c6
-rw-r--r--drivers/net/pcmcia/3c574_cs.c7
-rw-r--r--drivers/net/pcmcia/3c589_cs.c7
-rw-r--r--drivers/net/pcmcia/axnet_cs.c7
-rw-r--r--drivers/net/pcmcia/com20020_cs.c7
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c7
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c7
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c7
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c7
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c6
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c7
-rw-r--r--drivers/net/ppp_async.c2
-rw-r--r--drivers/net/ppp_generic.c12
-rw-r--r--drivers/net/ppp_synctty.c2
-rw-r--r--drivers/net/shaper.c42
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/skge.h1
-rw-r--r--drivers/net/sungem.c4
-rw-r--r--drivers/net/sungem_phy.c69
-rw-r--r--drivers/net/sungem_phy.h3
-rw-r--r--drivers/net/tg3.c69
-rw-r--r--drivers/net/tg3.h10
-rw-r--r--drivers/net/tun.c2
-rw-r--r--drivers/net/typhoon.c6
-rw-r--r--drivers/net/wireless/airo.c4
-rw-r--r--drivers/net/wireless/airo_cs.c7
-rw-r--r--drivers/net/wireless/airport.c8
-rw-r--r--drivers/net/wireless/atmel_cs.c17
-rw-r--r--drivers/net/wireless/netwave_cs.c7
-rw-r--r--drivers/net/wireless/orinoco_cs.c7
-rw-r--r--drivers/net/wireless/ray_cs.c7
-rw-r--r--drivers/net/wireless/wavelan_cs.c7
-rw-r--r--drivers/net/wireless/wavelan_cs.p.h1
-rw-r--r--drivers/net/wireless/wl3501_cs.c19
36 files changed, 201 insertions, 196 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 00e5257b176f..8dc657fc8afb 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1261,7 +1261,7 @@ static void bmac_reset_and_enable(struct net_device *dev)
1261 spin_unlock_irqrestore(&bp->lock, flags); 1261 spin_unlock_irqrestore(&bp->lock, flags);
1262} 1262}
1263 1263
1264static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_match *match) 1264static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match)
1265{ 1265{
1266 int j, rev, ret; 1266 int j, rev, ret;
1267 struct bmac_data *bp; 1267 struct bmac_data *bp;
@@ -1645,16 +1645,13 @@ static int __devexit bmac_remove(struct macio_dev *mdev)
1645 return 0; 1645 return 0;
1646} 1646}
1647 1647
1648static struct of_match bmac_match[] = 1648static struct of_device_id bmac_match[] =
1649{ 1649{
1650 { 1650 {
1651 .name = "bmac", 1651 .name = "bmac",
1652 .type = OF_ANY_MATCH,
1653 .compatible = OF_ANY_MATCH,
1654 .data = (void *)0, 1652 .data = (void *)0,
1655 }, 1653 },
1656 { 1654 {
1657 .name = OF_ANY_MATCH,
1658 .type = "network", 1655 .type = "network",
1659 .compatible = "bmac+", 1656 .compatible = "bmac+",
1660 .data = (void *)1, 1657 .data = (void *)1,
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index ece1b1a13186..c27e417f32bf 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -304,7 +304,7 @@ static inline void scc_discard_buffers(struct scc_channel *scc)
304 scc->tx_buff = NULL; 304 scc->tx_buff = NULL;
305 } 305 }
306 306
307 while (skb_queue_len(&scc->tx_queue)) 307 while (!skb_queue_empty(&scc->tx_queue))
308 dev_kfree_skb(skb_dequeue(&scc->tx_queue)); 308 dev_kfree_skb(skb_dequeue(&scc->tx_queue));
309 309
310 spin_unlock_irqrestore(&scc->lock, flags); 310 spin_unlock_irqrestore(&scc->lock, flags);
@@ -1126,8 +1126,7 @@ static void t_dwait(unsigned long channel)
1126 1126
1127 if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */ 1127 if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */
1128 { 1128 {
1129 if (skb_queue_len(&scc->tx_queue) == 0) /* nothing to send */ 1129 if (skb_queue_empty(&scc->tx_queue)) { /* nothing to send */
1130 {
1131 scc->stat.tx_state = TXS_IDLE; 1130 scc->stat.tx_state = TXS_IDLE;
1132 netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */ 1131 netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */
1133 return; 1132 return;
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index 6ed2d7dbd44c..81d0a26e4f41 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -109,7 +109,7 @@ bitrev(int b)
109} 109}
110 110
111 111
112static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *match) 112static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_id *match)
113{ 113{
114 struct device_node *mace = macio_get_of_node(mdev); 114 struct device_node *mace = macio_get_of_node(mdev);
115 struct net_device *dev; 115 struct net_device *dev;
@@ -1009,12 +1009,10 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs)
1009 return IRQ_HANDLED; 1009 return IRQ_HANDLED;
1010} 1010}
1011 1011
1012static struct of_match mace_match[] = 1012static struct of_device_id mace_match[] =
1013{ 1013{
1014 { 1014 {
1015 .name = "mace", 1015 .name = "mace",
1016 .type = OF_ANY_MATCH,
1017 .compatible = OF_ANY_MATCH
1018 }, 1016 },
1019 {}, 1017 {},
1020}; 1018};
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index f0fc04bd37c4..71fd41122c91 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -86,7 +86,6 @@ earlier 3Com products.
86#include <linux/ethtool.h> 86#include <linux/ethtool.h>
87#include <linux/bitops.h> 87#include <linux/bitops.h>
88 88
89#include <pcmcia/version.h>
90#include <pcmcia/cs_types.h> 89#include <pcmcia/cs_types.h>
91#include <pcmcia/cs.h> 90#include <pcmcia/cs.h>
92#include <pcmcia/cistpl.h> 91#include <pcmcia/cistpl.h>
@@ -312,11 +311,6 @@ static dev_link_t *tc574_attach(void)
312 link->next = dev_list; 311 link->next = dev_list;
313 dev_list = link; 312 dev_list = link;
314 client_reg.dev_info = &dev_info; 313 client_reg.dev_info = &dev_info;
315 client_reg.EventMask =
316 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
317 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
318 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
319 client_reg.event_handler = &tc574_event;
320 client_reg.Version = 0x0210; 314 client_reg.Version = 0x0210;
321 client_reg.event_callback_args.client_data = link; 315 client_reg.event_callback_args.client_data = link;
322 ret = pcmcia_register_client(&link->handle, &client_reg); 316 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -1299,6 +1293,7 @@ static struct pcmcia_driver tc574_driver = {
1299 .name = "3c574_cs", 1293 .name = "3c574_cs",
1300 }, 1294 },
1301 .attach = tc574_attach, 1295 .attach = tc574_attach,
1296 .event = tc574_event,
1302 .detach = tc574_detach, 1297 .detach = tc574_detach,
1303 .id_table = tc574_ids, 1298 .id_table = tc574_ids,
1304}; 1299};
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 8fa1b5f0fb68..d83fdd8c1943 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -40,7 +40,6 @@
40#include <linux/ioport.h> 40#include <linux/ioport.h>
41#include <linux/bitops.h> 41#include <linux/bitops.h>
42 42
43#include <pcmcia/version.h>
44#include <pcmcia/cs_types.h> 43#include <pcmcia/cs_types.h>
45#include <pcmcia/cs.h> 44#include <pcmcia/cs.h>
46#include <pcmcia/cistpl.h> 45#include <pcmcia/cistpl.h>
@@ -226,11 +225,6 @@ static dev_link_t *tc589_attach(void)
226 link->next = dev_list; 225 link->next = dev_list;
227 dev_list = link; 226 dev_list = link;
228 client_reg.dev_info = &dev_info; 227 client_reg.dev_info = &dev_info;
229 client_reg.EventMask =
230 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
231 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
232 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
233 client_reg.event_handler = &tc589_event;
234 client_reg.Version = 0x0210; 228 client_reg.Version = 0x0210;
235 client_reg.event_callback_args.client_data = link; 229 client_reg.event_callback_args.client_data = link;
236 ret = pcmcia_register_client(&link->handle, &client_reg); 230 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -1074,6 +1068,7 @@ static struct pcmcia_driver tc589_driver = {
1074 .name = "3c589_cs", 1068 .name = "3c589_cs",
1075 }, 1069 },
1076 .attach = tc589_attach, 1070 .attach = tc589_attach,
1071 .event = tc589_event,
1077 .detach = tc589_detach, 1072 .detach = tc589_detach,
1078 .id_table = tc589_ids, 1073 .id_table = tc589_ids,
1079}; 1074};
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 23ce77b1d5b0..8bb4e85689ea 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -37,7 +37,6 @@
37#include <linux/netdevice.h> 37#include <linux/netdevice.h>
38#include "../8390.h" 38#include "../8390.h"
39 39
40#include <pcmcia/version.h>
41#include <pcmcia/cs_types.h> 40#include <pcmcia/cs_types.h>
42#include <pcmcia/cs.h> 41#include <pcmcia/cs.h>
43#include <pcmcia/cistpl.h> 42#include <pcmcia/cistpl.h>
@@ -181,11 +180,6 @@ static dev_link_t *axnet_attach(void)
181 link->next = dev_list; 180 link->next = dev_list;
182 dev_list = link; 181 dev_list = link;
183 client_reg.dev_info = &dev_info; 182 client_reg.dev_info = &dev_info;
184 client_reg.EventMask =
185 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
186 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
187 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
188 client_reg.event_handler = &axnet_event;
189 client_reg.Version = 0x0210; 183 client_reg.Version = 0x0210;
190 client_reg.event_callback_args.client_data = link; 184 client_reg.event_callback_args.client_data = link;
191 ret = pcmcia_register_client(&link->handle, &client_reg); 185 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -884,6 +878,7 @@ static struct pcmcia_driver axnet_cs_driver = {
884 .name = "axnet_cs", 878 .name = "axnet_cs",
885 }, 879 },
886 .attach = axnet_attach, 880 .attach = axnet_attach,
881 .event = axnet_event,
887 .detach = axnet_detach, 882 .detach = axnet_detach,
888 .id_table = axnet_ids, 883 .id_table = axnet_ids,
889}; 884};
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 68d58cc58d31..b9355d9498a3 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -43,7 +43,6 @@
43#include <linux/arcdevice.h> 43#include <linux/arcdevice.h>
44#include <linux/com20020.h> 44#include <linux/com20020.h>
45 45
46#include <pcmcia/version.h>
47#include <pcmcia/cs_types.h> 46#include <pcmcia/cs_types.h>
48#include <pcmcia/cs.h> 47#include <pcmcia/cs.h>
49#include <pcmcia/cistpl.h> 48#include <pcmcia/cistpl.h>
@@ -200,11 +199,6 @@ static dev_link_t *com20020_attach(void)
200 link->next = dev_list; 199 link->next = dev_list;
201 dev_list = link; 200 dev_list = link;
202 client_reg.dev_info = &dev_info; 201 client_reg.dev_info = &dev_info;
203 client_reg.EventMask =
204 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
205 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
206 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
207 client_reg.event_handler = &com20020_event;
208 client_reg.Version = 0x0210; 202 client_reg.Version = 0x0210;
209 client_reg.event_callback_args.client_data = link; 203 client_reg.event_callback_args.client_data = link;
210 ret = pcmcia_register_client(&link->handle, &client_reg); 204 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -495,6 +489,7 @@ static struct pcmcia_driver com20020_cs_driver = {
495 .name = "com20020_cs", 489 .name = "com20020_cs",
496 }, 490 },
497 .attach = com20020_attach, 491 .attach = com20020_attach,
492 .event = com20020_event,
498 .detach = com20020_detach, 493 .detach = com20020_detach,
499 .id_table = com20020_ids, 494 .id_table = com20020_ids,
500}; 495};
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 917adbbf0b5b..9d8197bb293a 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -49,7 +49,6 @@
49#include <linux/ioport.h> 49#include <linux/ioport.h>
50#include <linux/crc32.h> 50#include <linux/crc32.h>
51 51
52#include <pcmcia/version.h>
53#include <pcmcia/cs_types.h> 52#include <pcmcia/cs_types.h>
54#include <pcmcia/cs.h> 53#include <pcmcia/cs.h>
55#include <pcmcia/cistpl.h> 54#include <pcmcia/cistpl.h>
@@ -288,11 +287,6 @@ static dev_link_t *fmvj18x_attach(void)
288 link->next = dev_list; 287 link->next = dev_list;
289 dev_list = link; 288 dev_list = link;
290 client_reg.dev_info = &dev_info; 289 client_reg.dev_info = &dev_info;
291 client_reg.EventMask =
292 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
293 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
294 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
295 client_reg.event_handler = &fmvj18x_event;
296 client_reg.Version = 0x0210; 290 client_reg.Version = 0x0210;
297 client_reg.event_callback_args.client_data = link; 291 client_reg.event_callback_args.client_data = link;
298 ret = pcmcia_register_client(&link->handle, &client_reg); 292 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -797,6 +791,7 @@ static struct pcmcia_driver fmvj18x_cs_driver = {
797 .name = "fmvj18x_cs", 791 .name = "fmvj18x_cs",
798 }, 792 },
799 .attach = fmvj18x_attach, 793 .attach = fmvj18x_attach,
794 .event = fmvj18x_event,
800 .detach = fmvj18x_detach, 795 .detach = fmvj18x_detach,
801 .id_table = fmvj18x_ids, 796 .id_table = fmvj18x_ids,
802}; 797};
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index cf6d073ea558..b6c140eb9799 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -57,7 +57,6 @@
57#include <linux/trdevice.h> 57#include <linux/trdevice.h>
58#include <linux/ibmtr.h> 58#include <linux/ibmtr.h>
59 59
60#include <pcmcia/version.h>
61#include <pcmcia/cs_types.h> 60#include <pcmcia/cs_types.h>
62#include <pcmcia/cs.h> 61#include <pcmcia/cs.h>
63#include <pcmcia/cistpl.h> 62#include <pcmcia/cistpl.h>
@@ -190,11 +189,6 @@ static dev_link_t *ibmtr_attach(void)
190 link->next = dev_list; 189 link->next = dev_list;
191 dev_list = link; 190 dev_list = link;
192 client_reg.dev_info = &dev_info; 191 client_reg.dev_info = &dev_info;
193 client_reg.EventMask =
194 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
195 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
196 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
197 client_reg.event_handler = &ibmtr_event;
198 client_reg.Version = 0x0210; 192 client_reg.Version = 0x0210;
199 client_reg.event_callback_args.client_data = link; 193 client_reg.event_callback_args.client_data = link;
200 ret = pcmcia_register_client(&link->handle, &client_reg); 194 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -521,6 +515,7 @@ static struct pcmcia_driver ibmtr_cs_driver = {
521 .name = "ibmtr_cs", 515 .name = "ibmtr_cs",
522 }, 516 },
523 .attach = ibmtr_attach, 517 .attach = ibmtr_attach,
518 .event = ibmtr_event,
524 .detach = ibmtr_detach, 519 .detach = ibmtr_detach,
525 .id_table = ibmtr_ids, 520 .id_table = ibmtr_ids,
526}; 521};
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index b86e7253fbfc..dbb941004ae9 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -146,7 +146,6 @@ Include Files
146#include <linux/ioport.h> 146#include <linux/ioport.h>
147#include <linux/bitops.h> 147#include <linux/bitops.h>
148 148
149#include <pcmcia/version.h>
150#include <pcmcia/cs_types.h> 149#include <pcmcia/cs_types.h>
151#include <pcmcia/cs.h> 150#include <pcmcia/cs.h>
152#include <pcmcia/cisreg.h> 151#include <pcmcia/cisreg.h>
@@ -502,11 +501,6 @@ static dev_link_t *nmclan_attach(void)
502 link->next = dev_list; 501 link->next = dev_list;
503 dev_list = link; 502 dev_list = link;
504 client_reg.dev_info = &dev_info; 503 client_reg.dev_info = &dev_info;
505 client_reg.EventMask =
506 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
507 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
508 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
509 client_reg.event_handler = &nmclan_event;
510 client_reg.Version = 0x0210; 504 client_reg.Version = 0x0210;
511 client_reg.event_callback_args.client_data = link; 505 client_reg.event_callback_args.client_data = link;
512 ret = pcmcia_register_client(&link->handle, &client_reg); 506 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -1688,6 +1682,7 @@ static struct pcmcia_driver nmclan_cs_driver = {
1688 .name = "nmclan_cs", 1682 .name = "nmclan_cs",
1689 }, 1683 },
1690 .attach = nmclan_attach, 1684 .attach = nmclan_attach,
1685 .event = nmclan_event,
1691 .detach = nmclan_detach, 1686 .detach = nmclan_detach,
1692 .id_table = nmclan_ids, 1687 .id_table = nmclan_ids,
1693}; 1688};
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 855a45d062b1..e1664aef3dfd 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -40,7 +40,6 @@
40#include <linux/netdevice.h> 40#include <linux/netdevice.h>
41#include <../drivers/net/8390.h> 41#include <../drivers/net/8390.h>
42 42
43#include <pcmcia/version.h>
44#include <pcmcia/cs_types.h> 43#include <pcmcia/cs_types.h>
45#include <pcmcia/cs.h> 44#include <pcmcia/cs.h>
46#include <pcmcia/cistpl.h> 45#include <pcmcia/cistpl.h>
@@ -276,11 +275,6 @@ static dev_link_t *pcnet_attach(void)
276 link->next = dev_list; 275 link->next = dev_list;
277 dev_list = link; 276 dev_list = link;
278 client_reg.dev_info = &dev_info; 277 client_reg.dev_info = &dev_info;
279 client_reg.EventMask =
280 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
281 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
282 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
283 client_reg.event_handler = &pcnet_event;
284 client_reg.Version = 0x0210; 278 client_reg.Version = 0x0210;
285 client_reg.event_callback_args.client_data = link; 279 client_reg.event_callback_args.client_data = link;
286 ret = pcmcia_register_client(&link->handle, &client_reg); 280 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -1844,6 +1838,7 @@ static struct pcmcia_driver pcnet_driver = {
1844 .name = "pcnet_cs", 1838 .name = "pcnet_cs",
1845 }, 1839 },
1846 .attach = pcnet_attach, 1840 .attach = pcnet_attach,
1841 .event = pcnet_event,
1847 .detach = pcnet_detach, 1842 .detach = pcnet_detach,
1848 .owner = THIS_MODULE, 1843 .owner = THIS_MODULE,
1849 .id_table = pcnet_ids, 1844 .id_table = pcnet_ids,
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index bc01c88c6709..fbc2f58ff688 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -42,7 +42,6 @@
42#include <linux/ethtool.h> 42#include <linux/ethtool.h>
43#include <linux/mii.h> 43#include <linux/mii.h>
44 44
45#include <pcmcia/version.h>
46#include <pcmcia/cs_types.h> 45#include <pcmcia/cs_types.h>
47#include <pcmcia/cs.h> 46#include <pcmcia/cs.h>
48#include <pcmcia/cistpl.h> 47#include <pcmcia/cistpl.h>
@@ -370,10 +369,6 @@ static dev_link_t *smc91c92_attach(void)
370 link->next = dev_list; 369 link->next = dev_list;
371 dev_list = link; 370 dev_list = link;
372 client_reg.dev_info = &dev_info; 371 client_reg.dev_info = &dev_info;
373 client_reg.EventMask = CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
374 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
375 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
376 client_reg.event_handler = &smc91c92_event;
377 client_reg.Version = 0x0210; 372 client_reg.Version = 0x0210;
378 client_reg.event_callback_args.client_data = link; 373 client_reg.event_callback_args.client_data = link;
379 ret = pcmcia_register_client(&link->handle, &client_reg); 374 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -2365,6 +2360,7 @@ static struct pcmcia_driver smc91c92_cs_driver = {
2365 .name = "smc91c92_cs", 2360 .name = "smc91c92_cs",
2366 }, 2361 },
2367 .attach = smc91c92_attach, 2362 .attach = smc91c92_attach,
2363 .event = smc91c92_event,
2368 .detach = smc91c92_detach, 2364 .detach = smc91c92_detach,
2369 .id_table = smc91c92_ids, 2365 .id_table = smc91c92_ids,
2370}; 2366};
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 0cd225e1595c..9f33bad174e9 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -81,7 +81,6 @@
81#include <linux/ioport.h> 81#include <linux/ioport.h>
82#include <linux/bitops.h> 82#include <linux/bitops.h>
83 83
84#include <pcmcia/version.h>
85#include <pcmcia/cs_types.h> 84#include <pcmcia/cs_types.h>
86#include <pcmcia/cs.h> 85#include <pcmcia/cs.h>
87#include <pcmcia/cistpl.h> 86#include <pcmcia/cistpl.h>
@@ -619,11 +618,6 @@ xirc2ps_attach(void)
619 link->next = dev_list; 618 link->next = dev_list;
620 dev_list = link; 619 dev_list = link;
621 client_reg.dev_info = &dev_info; 620 client_reg.dev_info = &dev_info;
622 client_reg.EventMask =
623 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
624 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
625 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
626 client_reg.event_handler = &xirc2ps_event;
627 client_reg.Version = 0x0210; 621 client_reg.Version = 0x0210;
628 client_reg.event_callback_args.client_data = link; 622 client_reg.event_callback_args.client_data = link;
629 if ((err = pcmcia_register_client(&link->handle, &client_reg))) { 623 if ((err = pcmcia_register_client(&link->handle, &client_reg))) {
@@ -2016,6 +2010,7 @@ static struct pcmcia_driver xirc2ps_cs_driver = {
2016 .name = "xirc2ps_cs", 2010 .name = "xirc2ps_cs",
2017 }, 2011 },
2018 .attach = xirc2ps_attach, 2012 .attach = xirc2ps_attach,
2013 .event = xirc2ps_event,
2019 .detach = xirc2ps_detach, 2014 .detach = xirc2ps_detach,
2020 .id_table = xirc2ps_ids, 2015 .id_table = xirc2ps_ids,
2021}; 2016};
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 5e48b9ab3045..59e8183c639e 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -364,7 +364,7 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
364 spin_lock_irqsave(&ap->recv_lock, flags); 364 spin_lock_irqsave(&ap->recv_lock, flags);
365 ppp_async_input(ap, buf, cflags, count); 365 ppp_async_input(ap, buf, cflags, count);
366 spin_unlock_irqrestore(&ap->recv_lock, flags); 366 spin_unlock_irqrestore(&ap->recv_lock, flags);
367 if (skb_queue_len(&ap->rqueue)) 367 if (!skb_queue_empty(&ap->rqueue))
368 tasklet_schedule(&ap->tsk); 368 tasklet_schedule(&ap->tsk);
369 ap_put(ap); 369 ap_put(ap);
370 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) 370 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index ab726ab43798..a32668e88e09 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1237,8 +1237,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1237 pch = list_entry(list, struct channel, clist); 1237 pch = list_entry(list, struct channel, clist);
1238 navail += pch->avail = (pch->chan != NULL); 1238 navail += pch->avail = (pch->chan != NULL);
1239 if (pch->avail) { 1239 if (pch->avail) {
1240 if (skb_queue_len(&pch->file.xq) == 0 1240 if (skb_queue_empty(&pch->file.xq) ||
1241 || !pch->had_frag) { 1241 !pch->had_frag) {
1242 pch->avail = 2; 1242 pch->avail = 2;
1243 ++nfree; 1243 ++nfree;
1244 } 1244 }
@@ -1374,8 +1374,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1374 1374
1375 /* try to send it down the channel */ 1375 /* try to send it down the channel */
1376 chan = pch->chan; 1376 chan = pch->chan;
1377 if (skb_queue_len(&pch->file.xq) 1377 if (!skb_queue_empty(&pch->file.xq) ||
1378 || !chan->ops->start_xmit(chan, frag)) 1378 !chan->ops->start_xmit(chan, frag))
1379 skb_queue_tail(&pch->file.xq, frag); 1379 skb_queue_tail(&pch->file.xq, frag);
1380 pch->had_frag = 1; 1380 pch->had_frag = 1;
1381 p += flen; 1381 p += flen;
@@ -1412,7 +1412,7 @@ ppp_channel_push(struct channel *pch)
1412 1412
1413 spin_lock_bh(&pch->downl); 1413 spin_lock_bh(&pch->downl);
1414 if (pch->chan != 0) { 1414 if (pch->chan != 0) {
1415 while (skb_queue_len(&pch->file.xq) > 0) { 1415 while (!skb_queue_empty(&pch->file.xq)) {
1416 skb = skb_dequeue(&pch->file.xq); 1416 skb = skb_dequeue(&pch->file.xq);
1417 if (!pch->chan->ops->start_xmit(pch->chan, skb)) { 1417 if (!pch->chan->ops->start_xmit(pch->chan, skb)) {
1418 /* put the packet back and try again later */ 1418 /* put the packet back and try again later */
@@ -1426,7 +1426,7 @@ ppp_channel_push(struct channel *pch)
1426 } 1426 }
1427 spin_unlock_bh(&pch->downl); 1427 spin_unlock_bh(&pch->downl);
1428 /* see if there is anything from the attached unit to be sent */ 1428 /* see if there is anything from the attached unit to be sent */
1429 if (skb_queue_len(&pch->file.xq) == 0) { 1429 if (skb_queue_empty(&pch->file.xq)) {
1430 read_lock_bh(&pch->upl); 1430 read_lock_bh(&pch->upl);
1431 ppp = pch->ppp; 1431 ppp = pch->ppp;
1432 if (ppp != 0) 1432 if (ppp != 0)
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index fd9f50180355..4d51c0c8023d 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -406,7 +406,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
406 spin_lock_irqsave(&ap->recv_lock, flags); 406 spin_lock_irqsave(&ap->recv_lock, flags);
407 ppp_sync_input(ap, buf, cflags, count); 407 ppp_sync_input(ap, buf, cflags, count);
408 spin_unlock_irqrestore(&ap->recv_lock, flags); 408 spin_unlock_irqrestore(&ap->recv_lock, flags);
409 if (skb_queue_len(&ap->rqueue)) 409 if (!skb_queue_empty(&ap->rqueue))
410 tasklet_schedule(&ap->tsk); 410 tasklet_schedule(&ap->tsk);
411 sp_put(ap); 411 sp_put(ap);
412 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) 412 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c
index 20edeb345792..3ad0b6751f6f 100644
--- a/drivers/net/shaper.c
+++ b/drivers/net/shaper.c
@@ -135,10 +135,8 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev)
135{ 135{
136 struct shaper *shaper = dev->priv; 136 struct shaper *shaper = dev->priv;
137 struct sk_buff *ptr; 137 struct sk_buff *ptr;
138 138
139 if (down_trylock(&shaper->sem)) 139 spin_lock(&shaper->lock);
140 return -1;
141
142 ptr=shaper->sendq.prev; 140 ptr=shaper->sendq.prev;
143 141
144 /* 142 /*
@@ -232,7 +230,7 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev)
232 shaper->stats.collisions++; 230 shaper->stats.collisions++;
233 } 231 }
234 shaper_kick(shaper); 232 shaper_kick(shaper);
235 up(&shaper->sem); 233 spin_unlock(&shaper->lock);
236 return 0; 234 return 0;
237} 235}
238 236
@@ -271,11 +269,9 @@ static void shaper_timer(unsigned long data)
271{ 269{
272 struct shaper *shaper = (struct shaper *)data; 270 struct shaper *shaper = (struct shaper *)data;
273 271
274 if (!down_trylock(&shaper->sem)) { 272 spin_lock(&shaper->lock);
275 shaper_kick(shaper); 273 shaper_kick(shaper);
276 up(&shaper->sem); 274 spin_unlock(&shaper->lock);
277 } else
278 mod_timer(&shaper->timer, jiffies);
279} 275}
280 276
281/* 277/*
@@ -332,21 +328,6 @@ static void shaper_kick(struct shaper *shaper)
332 328
333 329
334/* 330/*
335 * Flush the shaper queues on a closedown
336 */
337
338static void shaper_flush(struct shaper *shaper)
339{
340 struct sk_buff *skb;
341
342 down(&shaper->sem);
343 while((skb=skb_dequeue(&shaper->sendq))!=NULL)
344 dev_kfree_skb(skb);
345 shaper_kick(shaper);
346 up(&shaper->sem);
347}
348
349/*
350 * Bring the interface up. We just disallow this until a 331 * Bring the interface up. We just disallow this until a
351 * bind. 332 * bind.
352 */ 333 */
@@ -375,7 +356,15 @@ static int shaper_open(struct net_device *dev)
375static int shaper_close(struct net_device *dev) 356static int shaper_close(struct net_device *dev)
376{ 357{
377 struct shaper *shaper=dev->priv; 358 struct shaper *shaper=dev->priv;
378 shaper_flush(shaper); 359 struct sk_buff *skb;
360
361 while ((skb = skb_dequeue(&shaper->sendq)) != NULL)
362 dev_kfree_skb(skb);
363
364 spin_lock_bh(&shaper->lock);
365 shaper_kick(shaper);
366 spin_unlock_bh(&shaper->lock);
367
379 del_timer_sync(&shaper->timer); 368 del_timer_sync(&shaper->timer);
380 return 0; 369 return 0;
381} 370}
@@ -576,6 +565,7 @@ static void shaper_init_priv(struct net_device *dev)
576 init_timer(&sh->timer); 565 init_timer(&sh->timer);
577 sh->timer.function=shaper_timer; 566 sh->timer.function=shaper_timer;
578 sh->timer.data=(unsigned long)sh; 567 sh->timer.data=(unsigned long)sh;
568 spin_lock_init(&sh->lock);
579} 569}
580 570
581/* 571/*
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 3dbb1cb09ed8..5cacc7ad9e79 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3259,7 +3259,7 @@ static void __devexit skge_remove(struct pci_dev *pdev)
3259} 3259}
3260 3260
3261#ifdef CONFIG_PM 3261#ifdef CONFIG_PM
3262static int skge_suspend(struct pci_dev *pdev, u32 state) 3262static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
3263{ 3263{
3264 struct skge_hw *hw = pci_get_drvdata(pdev); 3264 struct skge_hw *hw = pci_get_drvdata(pdev);
3265 int i, wol = 0; 3265 int i, wol = 0;
@@ -3279,7 +3279,7 @@ static int skge_suspend(struct pci_dev *pdev, u32 state)
3279 } 3279 }
3280 3280
3281 pci_save_state(pdev); 3281 pci_save_state(pdev);
3282 pci_enable_wake(pdev, state, wol); 3282 pci_enable_wake(pdev, pci_choose_state(pdev, state), wol);
3283 pci_disable_device(pdev); 3283 pci_disable_device(pdev);
3284 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 3284 pci_set_power_state(pdev, pci_choose_state(pdev, state));
3285 3285
diff --git a/drivers/net/skge.h b/drivers/net/skge.h
index 14d0cc01fb9a..fced3d2bc072 100644
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -7,6 +7,7 @@
7/* PCI config registers */ 7/* PCI config registers */
8#define PCI_DEV_REG1 0x40 8#define PCI_DEV_REG1 0x40
9#define PCI_DEV_REG2 0x44 9#define PCI_DEV_REG2 0x44
10#define PCI_REV_DESC 0x4
10 11
11#define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \ 12#define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \
12 PCI_STATUS_SIG_SYSTEM_ERROR | \ 13 PCI_STATUS_SIG_SYSTEM_ERROR | \
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 1f5655655c40..2608e7a3d214 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -3079,7 +3079,9 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3079 gp->phy_mii.dev = dev; 3079 gp->phy_mii.dev = dev;
3080 gp->phy_mii.mdio_read = _phy_read; 3080 gp->phy_mii.mdio_read = _phy_read;
3081 gp->phy_mii.mdio_write = _phy_write; 3081 gp->phy_mii.mdio_write = _phy_write;
3082 3082#ifdef CONFIG_PPC_PMAC
3083 gp->phy_mii.platform_data = gp->of_node;
3084#endif
3083 /* By default, we start with autoneg */ 3085 /* By default, we start with autoneg */
3084 gp->want_autoneg = 1; 3086 gp->want_autoneg = 1;
3085 3087
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index 0fca414d3657..d3ddb41d6e5c 100644
--- a/drivers/net/sungem_phy.c
+++ b/drivers/net/sungem_phy.c
@@ -32,6 +32,10 @@
32#include <linux/ethtool.h> 32#include <linux/ethtool.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34 34
35#ifdef CONFIG_PPC_PMAC
36#include <asm/prom.h>
37#endif
38
35#include "sungem_phy.h" 39#include "sungem_phy.h"
36 40
37/* Link modes of the BCM5400 PHY */ 41/* Link modes of the BCM5400 PHY */
@@ -281,10 +285,12 @@ static int bcm5411_suspend(struct mii_phy* phy)
281static int bcm5421_init(struct mii_phy* phy) 285static int bcm5421_init(struct mii_phy* phy)
282{ 286{
283 u16 data; 287 u16 data;
284 int rev; 288 unsigned int id;
285 289
286 rev = phy_read(phy, MII_PHYSID2) & 0x000f; 290 id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2));
287 if (rev == 0) { 291
292 /* Revision 0 of 5421 needs some fixups */
293 if (id == 0x002060e0) {
288 /* This is borrowed from MacOS 294 /* This is borrowed from MacOS
289 */ 295 */
290 phy_write(phy, 0x18, 0x1007); 296 phy_write(phy, 0x18, 0x1007);
@@ -297,21 +303,28 @@ static int bcm5421_init(struct mii_phy* phy)
297 data = phy_read(phy, 0x15); 303 data = phy_read(phy, 0x15);
298 phy_write(phy, 0x15, data | 0x0200); 304 phy_write(phy, 0x15, data | 0x0200);
299 } 305 }
300#if 0
301 /* This has to be verified before I enable it */
302 /* Enable automatic low-power */
303 phy_write(phy, 0x1c, 0x9002);
304 phy_write(phy, 0x1c, 0xa821);
305 phy_write(phy, 0x1c, 0x941d);
306#endif
307 return 0;
308}
309 306
310static int bcm5421k2_init(struct mii_phy* phy) 307 /* Pick up some init code from OF for K2 version */
311{ 308 if ((id & 0xfffffff0) == 0x002062e0) {
312 /* Init code borrowed from OF */ 309 phy_write(phy, 4, 0x01e1);
313 phy_write(phy, 4, 0x01e1); 310 phy_write(phy, 9, 0x0300);
314 phy_write(phy, 9, 0x0300); 311 }
312
313 /* Check if we can enable automatic low power */
314#ifdef CONFIG_PPC_PMAC
315 if (phy->platform_data) {
316 struct device_node *np = of_get_parent(phy->platform_data);
317 int can_low_power = 1;
318 if (np == NULL || get_property(np, "no-autolowpower", NULL))
319 can_low_power = 0;
320 if (can_low_power) {
321 /* Enable automatic low-power */
322 phy_write(phy, 0x1c, 0x9002);
323 phy_write(phy, 0x1c, 0xa821);
324 phy_write(phy, 0x1c, 0x941d);
325 }
326 }
327#endif /* CONFIG_PPC_PMAC */
315 328
316 return 0; 329 return 0;
317} 330}
@@ -762,7 +775,7 @@ static struct mii_phy_def bcm5421_phy_def = {
762 775
763/* Broadcom BCM 5421 built-in K2 */ 776/* Broadcom BCM 5421 built-in K2 */
764static struct mii_phy_ops bcm5421k2_phy_ops = { 777static struct mii_phy_ops bcm5421k2_phy_ops = {
765 .init = bcm5421k2_init, 778 .init = bcm5421_init,
766 .suspend = bcm5411_suspend, 779 .suspend = bcm5411_suspend,
767 .setup_aneg = bcm54xx_setup_aneg, 780 .setup_aneg = bcm54xx_setup_aneg,
768 .setup_forced = bcm54xx_setup_forced, 781 .setup_forced = bcm54xx_setup_forced,
@@ -779,6 +792,25 @@ static struct mii_phy_def bcm5421k2_phy_def = {
779 .ops = &bcm5421k2_phy_ops 792 .ops = &bcm5421k2_phy_ops
780}; 793};
781 794
795/* Broadcom BCM 5462 built-in Vesta */
796static struct mii_phy_ops bcm5462V_phy_ops = {
797 .init = bcm5421_init,
798 .suspend = bcm5411_suspend,
799 .setup_aneg = bcm54xx_setup_aneg,
800 .setup_forced = bcm54xx_setup_forced,
801 .poll_link = genmii_poll_link,
802 .read_link = bcm54xx_read_link,
803};
804
805static struct mii_phy_def bcm5462V_phy_def = {
806 .phy_id = 0x002060d0,
807 .phy_id_mask = 0xfffffff0,
808 .name = "BCM5462-Vesta",
809 .features = MII_GBIT_FEATURES,
810 .magic_aneg = 1,
811 .ops = &bcm5462V_phy_ops
812};
813
782/* Marvell 88E1101 (Apple seem to deal with 2 different revs, 814/* Marvell 88E1101 (Apple seem to deal with 2 different revs,
783 * I masked out the 8 last bits to get both, but some specs 815 * I masked out the 8 last bits to get both, but some specs
784 * would be useful here) --BenH. 816 * would be useful here) --BenH.
@@ -824,6 +856,7 @@ static struct mii_phy_def* mii_phy_table[] = {
824 &bcm5411_phy_def, 856 &bcm5411_phy_def,
825 &bcm5421_phy_def, 857 &bcm5421_phy_def,
826 &bcm5421k2_phy_def, 858 &bcm5421k2_phy_def,
859 &bcm5462V_phy_def,
827 &marvell_phy_def, 860 &marvell_phy_def,
828 &genmii_phy_def, 861 &genmii_phy_def,
829 NULL 862 NULL
diff --git a/drivers/net/sungem_phy.h b/drivers/net/sungem_phy.h
index 822cb58174ea..430544496c52 100644
--- a/drivers/net/sungem_phy.h
+++ b/drivers/net/sungem_phy.h
@@ -43,9 +43,10 @@ struct mii_phy
43 int pause; 43 int pause;
44 44
45 /* Provided by host chip */ 45 /* Provided by host chip */
46 struct net_device* dev; 46 struct net_device *dev;
47 int (*mdio_read) (struct net_device *dev, int mii_id, int reg); 47 int (*mdio_read) (struct net_device *dev, int mii_id, int reg);
48 void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val); 48 void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val);
49 void *platform_data;
49}; 50};
50 51
51/* Pass in a struct mii_phy with dev, mdio_read and mdio_write 52/* Pass in a struct mii_phy with dev, mdio_read and mdio_write
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 7e371b1209a1..54640686e983 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
66 66
67#define DRV_MODULE_NAME "tg3" 67#define DRV_MODULE_NAME "tg3"
68#define PFX DRV_MODULE_NAME ": " 68#define PFX DRV_MODULE_NAME ": "
69#define DRV_MODULE_VERSION "3.32" 69#define DRV_MODULE_VERSION "3.33"
70#define DRV_MODULE_RELDATE "June 24, 2005" 70#define DRV_MODULE_RELDATE "July 5, 2005"
71 71
72#define TG3_DEF_MAC_MODE 0 72#define TG3_DEF_MAC_MODE 0
73#define TG3_DEF_RX_MODE 0 73#define TG3_DEF_RX_MODE 0
@@ -5117,7 +5117,7 @@ static void tg3_set_bdinfo(struct tg3 *tp, u32 bdinfo_addr,
5117} 5117}
5118 5118
5119static void __tg3_set_rx_mode(struct net_device *); 5119static void __tg3_set_rx_mode(struct net_device *);
5120static void tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) 5120static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec)
5121{ 5121{
5122 tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs); 5122 tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs);
5123 tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs); 5123 tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs);
@@ -5460,7 +5460,7 @@ static int tg3_reset_hw(struct tg3 *tp)
5460 udelay(10); 5460 udelay(10);
5461 } 5461 }
5462 5462
5463 tg3_set_coalesce(tp, &tp->coal); 5463 __tg3_set_coalesce(tp, &tp->coal);
5464 5464
5465 /* set status block DMA address */ 5465 /* set status block DMA address */
5466 tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 5466 tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
@@ -7821,6 +7821,60 @@ static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
7821 return 0; 7821 return 0;
7822} 7822}
7823 7823
7824static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
7825{
7826 struct tg3 *tp = netdev_priv(dev);
7827 u32 max_rxcoal_tick_int = 0, max_txcoal_tick_int = 0;
7828 u32 max_stat_coal_ticks = 0, min_stat_coal_ticks = 0;
7829
7830 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
7831 max_rxcoal_tick_int = MAX_RXCOAL_TICK_INT;
7832 max_txcoal_tick_int = MAX_TXCOAL_TICK_INT;
7833 max_stat_coal_ticks = MAX_STAT_COAL_TICKS;
7834 min_stat_coal_ticks = MIN_STAT_COAL_TICKS;
7835 }
7836
7837 if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) ||
7838 (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) ||
7839 (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) ||
7840 (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) ||
7841 (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||
7842 (ec->tx_coalesce_usecs_irq > max_txcoal_tick_int) ||
7843 (ec->rx_max_coalesced_frames_irq > MAX_RXCOAL_MAXF_INT) ||
7844 (ec->tx_max_coalesced_frames_irq > MAX_TXCOAL_MAXF_INT) ||
7845 (ec->stats_block_coalesce_usecs > max_stat_coal_ticks) ||
7846 (ec->stats_block_coalesce_usecs < min_stat_coal_ticks))
7847 return -EINVAL;
7848
7849 /* No rx interrupts will be generated if both are zero */
7850 if ((ec->rx_coalesce_usecs == 0) &&
7851 (ec->rx_max_coalesced_frames == 0))
7852 return -EINVAL;
7853
7854 /* No tx interrupts will be generated if both are zero */
7855 if ((ec->tx_coalesce_usecs == 0) &&
7856 (ec->tx_max_coalesced_frames == 0))
7857 return -EINVAL;
7858
7859 /* Only copy relevant parameters, ignore all others. */
7860 tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs;
7861 tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs;
7862 tp->coal.rx_max_coalesced_frames = ec->rx_max_coalesced_frames;
7863 tp->coal.tx_max_coalesced_frames = ec->tx_max_coalesced_frames;
7864 tp->coal.rx_coalesce_usecs_irq = ec->rx_coalesce_usecs_irq;
7865 tp->coal.tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq;
7866 tp->coal.rx_max_coalesced_frames_irq = ec->rx_max_coalesced_frames_irq;
7867 tp->coal.tx_max_coalesced_frames_irq = ec->tx_max_coalesced_frames_irq;
7868 tp->coal.stats_block_coalesce_usecs = ec->stats_block_coalesce_usecs;
7869
7870 if (netif_running(dev)) {
7871 tg3_full_lock(tp, 0);
7872 __tg3_set_coalesce(tp, &tp->coal);
7873 tg3_full_unlock(tp);
7874 }
7875 return 0;
7876}
7877
7824static struct ethtool_ops tg3_ethtool_ops = { 7878static struct ethtool_ops tg3_ethtool_ops = {
7825 .get_settings = tg3_get_settings, 7879 .get_settings = tg3_get_settings,
7826 .set_settings = tg3_set_settings, 7880 .set_settings = tg3_set_settings,
@@ -7856,6 +7910,7 @@ static struct ethtool_ops tg3_ethtool_ops = {
7856 .get_stats_count = tg3_get_stats_count, 7910 .get_stats_count = tg3_get_stats_count,
7857 .get_ethtool_stats = tg3_get_ethtool_stats, 7911 .get_ethtool_stats = tg3_get_ethtool_stats,
7858 .get_coalesce = tg3_get_coalesce, 7912 .get_coalesce = tg3_get_coalesce,
7913 .set_coalesce = tg3_set_coalesce,
7859}; 7914};
7860 7915
7861static void __devinit tg3_get_eeprom_size(struct tg3 *tp) 7916static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
@@ -9800,6 +9855,12 @@ static void __devinit tg3_init_coal(struct tg3 *tp)
9800 ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS; 9855 ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS;
9801 ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS; 9856 ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS;
9802 } 9857 }
9858
9859 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
9860 ec->rx_coalesce_usecs_irq = 0;
9861 ec->tx_coalesce_usecs_irq = 0;
9862 ec->stats_block_coalesce_usecs = 0;
9863 }
9803} 9864}
9804 9865
9805static int __devinit tg3_init_one(struct pci_dev *pdev, 9866static int __devinit tg3_init_one(struct pci_dev *pdev,
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 99c5f9675a56..70ad450733e6 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -879,31 +879,41 @@
879#define LOW_RXCOL_TICKS_CLRTCKS 0x00000014 879#define LOW_RXCOL_TICKS_CLRTCKS 0x00000014
880#define DEFAULT_RXCOL_TICKS 0x00000048 880#define DEFAULT_RXCOL_TICKS 0x00000048
881#define HIGH_RXCOL_TICKS 0x00000096 881#define HIGH_RXCOL_TICKS 0x00000096
882#define MAX_RXCOL_TICKS 0x000003ff
882#define HOSTCC_TXCOL_TICKS 0x00003c0c 883#define HOSTCC_TXCOL_TICKS 0x00003c0c
883#define LOW_TXCOL_TICKS 0x00000096 884#define LOW_TXCOL_TICKS 0x00000096
884#define LOW_TXCOL_TICKS_CLRTCKS 0x00000048 885#define LOW_TXCOL_TICKS_CLRTCKS 0x00000048
885#define DEFAULT_TXCOL_TICKS 0x0000012c 886#define DEFAULT_TXCOL_TICKS 0x0000012c
886#define HIGH_TXCOL_TICKS 0x00000145 887#define HIGH_TXCOL_TICKS 0x00000145
888#define MAX_TXCOL_TICKS 0x000003ff
887#define HOSTCC_RXMAX_FRAMES 0x00003c10 889#define HOSTCC_RXMAX_FRAMES 0x00003c10
888#define LOW_RXMAX_FRAMES 0x00000005 890#define LOW_RXMAX_FRAMES 0x00000005
889#define DEFAULT_RXMAX_FRAMES 0x00000008 891#define DEFAULT_RXMAX_FRAMES 0x00000008
890#define HIGH_RXMAX_FRAMES 0x00000012 892#define HIGH_RXMAX_FRAMES 0x00000012
893#define MAX_RXMAX_FRAMES 0x000000ff
891#define HOSTCC_TXMAX_FRAMES 0x00003c14 894#define HOSTCC_TXMAX_FRAMES 0x00003c14
892#define LOW_TXMAX_FRAMES 0x00000035 895#define LOW_TXMAX_FRAMES 0x00000035
893#define DEFAULT_TXMAX_FRAMES 0x0000004b 896#define DEFAULT_TXMAX_FRAMES 0x0000004b
894#define HIGH_TXMAX_FRAMES 0x00000052 897#define HIGH_TXMAX_FRAMES 0x00000052
898#define MAX_TXMAX_FRAMES 0x000000ff
895#define HOSTCC_RXCOAL_TICK_INT 0x00003c18 899#define HOSTCC_RXCOAL_TICK_INT 0x00003c18
896#define DEFAULT_RXCOAL_TICK_INT 0x00000019 900#define DEFAULT_RXCOAL_TICK_INT 0x00000019
897#define DEFAULT_RXCOAL_TICK_INT_CLRTCKS 0x00000014 901#define DEFAULT_RXCOAL_TICK_INT_CLRTCKS 0x00000014
902#define MAX_RXCOAL_TICK_INT 0x000003ff
898#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c 903#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c
899#define DEFAULT_TXCOAL_TICK_INT 0x00000019 904#define DEFAULT_TXCOAL_TICK_INT 0x00000019
900#define DEFAULT_TXCOAL_TICK_INT_CLRTCKS 0x00000014 905#define DEFAULT_TXCOAL_TICK_INT_CLRTCKS 0x00000014
906#define MAX_TXCOAL_TICK_INT 0x000003ff
901#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 907#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20
902#define DEFAULT_RXCOAL_MAXF_INT 0x00000005 908#define DEFAULT_RXCOAL_MAXF_INT 0x00000005
909#define MAX_RXCOAL_MAXF_INT 0x000000ff
903#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 910#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24
904#define DEFAULT_TXCOAL_MAXF_INT 0x00000005 911#define DEFAULT_TXCOAL_MAXF_INT 0x00000005
912#define MAX_TXCOAL_MAXF_INT 0x000000ff
905#define HOSTCC_STAT_COAL_TICKS 0x00003c28 913#define HOSTCC_STAT_COAL_TICKS 0x00003c28
906#define DEFAULT_STAT_COAL_TICKS 0x000f4240 914#define DEFAULT_STAT_COAL_TICKS 0x000f4240
915#define MAX_STAT_COAL_TICKS 0xd693d400
916#define MIN_STAT_COAL_TICKS 0x00000064
907/* 0x3c2c --> 0x3c30 unused */ 917/* 0x3c2c --> 0x3c30 unused */
908#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ 918#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */
909#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ 919#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 7bfee366297b..effab0b9adca 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -215,7 +215,7 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
215 215
216 poll_wait(file, &tun->read_wait, wait); 216 poll_wait(file, &tun->read_wait, wait);
217 217
218 if (skb_queue_len(&tun->readq)) 218 if (!skb_queue_empty(&tun->readq))
219 mask |= POLLIN | POLLRDNORM; 219 mask |= POLLIN | POLLRDNORM;
220 220
221 return mask; 221 return mask;
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 0b5ca2537963..ecfa6f8805ce 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1906,9 +1906,9 @@ typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events)
1906 */ 1906 */
1907 netif_carrier_off(tp->dev); 1907 netif_carrier_off(tp->dev);
1908 1908
1909 pci_enable_wake(tp->pdev, pci_choose_state(pdev, state), 1); 1909 pci_enable_wake(tp->pdev, state, 1);
1910 pci_disable_device(pdev); 1910 pci_disable_device(pdev);
1911 return pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1911 return pci_set_power_state(pdev, state);
1912} 1912}
1913 1913
1914static int 1914static int
@@ -2274,7 +2274,7 @@ typhoon_suspend(struct pci_dev *pdev, pm_message_t state)
2274 goto need_resume; 2274 goto need_resume;
2275 } 2275 }
2276 2276
2277 if(typhoon_sleep(tp, state, tp->wol_events) < 0) { 2277 if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) {
2278 printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name); 2278 printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name);
2279 goto need_resume; 2279 goto need_resume;
2280 } 2280 }
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index c12648d8192b..47f3c5d0203d 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2374,7 +2374,7 @@ void stop_airo_card( struct net_device *dev, int freeres )
2374 /* 2374 /*
2375 * Clean out tx queue 2375 * Clean out tx queue
2376 */ 2376 */
2377 if (test_bit(FLAG_MPI, &ai->flags) && skb_queue_len (&ai->txq) > 0) { 2377 if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) {
2378 struct sk_buff *skb = NULL; 2378 struct sk_buff *skb = NULL;
2379 for (;(skb = skb_dequeue(&ai->txq));) 2379 for (;(skb = skb_dequeue(&ai->txq));)
2380 dev_kfree_skb(skb); 2380 dev_kfree_skb(skb);
@@ -3287,7 +3287,7 @@ exitrx:
3287 if (status & EV_TXEXC) 3287 if (status & EV_TXEXC)
3288 get_tx_error(apriv, -1); 3288 get_tx_error(apriv, -1);
3289 spin_lock_irqsave(&apriv->aux_lock, flags); 3289 spin_lock_irqsave(&apriv->aux_lock, flags);
3290 if (skb_queue_len (&apriv->txq)) { 3290 if (!skb_queue_empty(&apriv->txq)) {
3291 spin_unlock_irqrestore(&apriv->aux_lock,flags); 3291 spin_unlock_irqrestore(&apriv->aux_lock,flags);
3292 mpi_send_packet (dev); 3292 mpi_send_packet (dev);
3293 } else { 3293 } else {
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index f10a9523034a..bf25584d68d3 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -33,7 +33,6 @@
33#include <linux/timer.h> 33#include <linux/timer.h>
34#include <linux/netdevice.h> 34#include <linux/netdevice.h>
35 35
36#include <pcmcia/version.h>
37#include <pcmcia/cs_types.h> 36#include <pcmcia/cs_types.h>
38#include <pcmcia/cs.h> 37#include <pcmcia/cs.h>
39#include <pcmcia/cistpl.h> 38#include <pcmcia/cistpl.h>
@@ -210,11 +209,6 @@ static dev_link_t *airo_attach(void)
210 link->next = dev_list; 209 link->next = dev_list;
211 dev_list = link; 210 dev_list = link;
212 client_reg.dev_info = &dev_info; 211 client_reg.dev_info = &dev_info;
213 client_reg.EventMask =
214 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
215 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
216 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
217 client_reg.event_handler = &airo_event;
218 client_reg.Version = 0x0210; 212 client_reg.Version = 0x0210;
219 client_reg.event_callback_args.client_data = link; 213 client_reg.event_callback_args.client_data = link;
220 ret = pcmcia_register_client(&link->handle, &client_reg); 214 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -574,6 +568,7 @@ static struct pcmcia_driver airo_driver = {
574 .name = "airo_cs", 568 .name = "airo_cs",
575 }, 569 },
576 .attach = airo_attach, 570 .attach = airo_attach,
571 .event = airo_event,
577 .detach = airo_detach, 572 .detach = airo_detach,
578 .id_table = airo_ids, 573 .id_table = airo_ids,
579}; 574};
diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c
index b4f4bd7956a2..9d496703c465 100644
--- a/drivers/net/wireless/airport.c
+++ b/drivers/net/wireless/airport.c
@@ -184,7 +184,7 @@ static int airport_hard_reset(struct orinoco_private *priv)
184} 184}
185 185
186static int 186static int
187airport_attach(struct macio_dev *mdev, const struct of_match *match) 187airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
188{ 188{
189 struct orinoco_private *priv; 189 struct orinoco_private *priv;
190 struct net_device *dev; 190 struct net_device *dev;
@@ -266,16 +266,16 @@ MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
266MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); 266MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
267MODULE_LICENSE("Dual MPL/GPL"); 267MODULE_LICENSE("Dual MPL/GPL");
268 268
269static struct of_match airport_match[] = 269static struct of_device_id airport_match[] =
270{ 270{
271 { 271 {
272 .name = "radio", 272 .name = "radio",
273 .type = OF_ANY_MATCH,
274 .compatible = OF_ANY_MATCH
275 }, 273 },
276 {}, 274 {},
277}; 275};
278 276
277MODULE_DEVICE_TABLE (of, airport_match);
278
279static struct macio_driver airport_driver = 279static struct macio_driver airport_driver =
280{ 280{
281 .name = DRIVER_NAME, 281 .name = DRIVER_NAME,
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 86379d4998ac..ff031a3985b3 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -43,7 +43,6 @@
43#include <linux/moduleparam.h> 43#include <linux/moduleparam.h>
44#include <linux/device.h> 44#include <linux/device.h>
45 45
46#include <pcmcia/version.h>
47#include <pcmcia/cs_types.h> 46#include <pcmcia/cs_types.h>
48#include <pcmcia/cs.h> 47#include <pcmcia/cs.h>
49#include <pcmcia/cistpl.h> 48#include <pcmcia/cistpl.h>
@@ -218,11 +217,6 @@ static dev_link_t *atmel_attach(void)
218 link->next = dev_list; 217 link->next = dev_list;
219 dev_list = link; 218 dev_list = link;
220 client_reg.dev_info = &dev_info; 219 client_reg.dev_info = &dev_info;
221 client_reg.EventMask =
222 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
223 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
224 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
225 client_reg.event_handler = &atmel_event;
226 client_reg.Version = 0x0210; 220 client_reg.Version = 0x0210;
227 client_reg.event_callback_args.client_data = link; 221 client_reg.event_callback_args.client_data = link;
228 ret = pcmcia_register_client(&link->handle, &client_reg); 222 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -668,12 +662,13 @@ static struct pcmcia_device_id atmel_ids[] = {
668MODULE_DEVICE_TABLE(pcmcia, atmel_ids); 662MODULE_DEVICE_TABLE(pcmcia, atmel_ids);
669 663
670static struct pcmcia_driver atmel_driver = { 664static struct pcmcia_driver atmel_driver = {
671 .owner = THIS_MODULE, 665 .owner = THIS_MODULE,
672 .drv = { 666 .drv = {
673 .name = "atmel_cs", 667 .name = "atmel_cs",
674 }, 668 },
675 .attach = atmel_attach, 669 .attach = atmel_attach,
676 .detach = atmel_detach, 670 .event = atmel_event,
671 .detach = atmel_detach,
677 .id_table = atmel_ids, 672 .id_table = atmel_ids,
678}; 673};
679 674
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index e12bd75b2694..5f507c49907b 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -62,7 +62,6 @@
62#endif /* WIRELESS_EXT > 12 */ 62#endif /* WIRELESS_EXT > 12 */
63#endif 63#endif
64 64
65#include <pcmcia/version.h>
66#include <pcmcia/cs_types.h> 65#include <pcmcia/cs_types.h>
67#include <pcmcia/cs.h> 66#include <pcmcia/cs.h>
68#include <pcmcia/cistpl.h> 67#include <pcmcia/cistpl.h>
@@ -491,11 +490,6 @@ static dev_link_t *netwave_attach(void)
491 link->next = dev_list; 490 link->next = dev_list;
492 dev_list = link; 491 dev_list = link;
493 client_reg.dev_info = &dev_info; 492 client_reg.dev_info = &dev_info;
494 client_reg.EventMask =
495 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
496 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
497 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
498 client_reg.event_handler = &netwave_event;
499 client_reg.Version = 0x0210; 493 client_reg.Version = 0x0210;
500 client_reg.event_callback_args.client_data = link; 494 client_reg.event_callback_args.client_data = link;
501 ret = pcmcia_register_client(&link->handle, &client_reg); 495 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -1680,6 +1674,7 @@ static struct pcmcia_driver netwave_driver = {
1680 .name = "netwave_cs", 1674 .name = "netwave_cs",
1681 }, 1675 },
1682 .attach = netwave_attach, 1676 .attach = netwave_attach,
1677 .event = netwave_event,
1683 .detach = netwave_detach, 1678 .detach = netwave_detach,
1684 .id_table = netwave_ids, 1679 .id_table = netwave_ids,
1685}; 1680};
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 597c4586d049..368d2f962f67 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -31,7 +31,6 @@
31#include <linux/etherdevice.h> 31#include <linux/etherdevice.h>
32#include <linux/wireless.h> 32#include <linux/wireless.h>
33 33
34#include <pcmcia/version.h>
35#include <pcmcia/cs_types.h> 34#include <pcmcia/cs_types.h>
36#include <pcmcia/cs.h> 35#include <pcmcia/cs.h>
37#include <pcmcia/cistpl.h> 36#include <pcmcia/cistpl.h>
@@ -186,11 +185,6 @@ orinoco_cs_attach(void)
186 dev_list = link; 185 dev_list = link;
187 186
188 client_reg.dev_info = &dev_info; 187 client_reg.dev_info = &dev_info;
189 client_reg.EventMask =
190 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
191 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
192 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
193 client_reg.event_handler = &orinoco_cs_event;
194 client_reg.Version = 0x0210; /* FIXME: what does this mean? */ 188 client_reg.Version = 0x0210; /* FIXME: what does this mean? */
195 client_reg.event_callback_args.client_data = link; 189 client_reg.event_callback_args.client_data = link;
196 190
@@ -664,6 +658,7 @@ static struct pcmcia_driver orinoco_driver = {
664 .name = DRIVER_NAME, 658 .name = DRIVER_NAME,
665 }, 659 },
666 .attach = orinoco_cs_attach, 660 .attach = orinoco_cs_attach,
661 .event = orinoco_cs_event,
667 .detach = orinoco_cs_detach, 662 .detach = orinoco_cs_detach,
668 .id_table = orinoco_cs_ids, 663 .id_table = orinoco_cs_ids,
669}; 664};
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 31652af52eac..0e0ba614259a 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -46,7 +46,6 @@
46#include <linux/skbuff.h> 46#include <linux/skbuff.h>
47#include <linux/ethtool.h> 47#include <linux/ethtool.h>
48 48
49#include <pcmcia/version.h>
50#include <pcmcia/cs_types.h> 49#include <pcmcia/cs_types.h>
51#include <pcmcia/cs.h> 50#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
@@ -393,11 +392,6 @@ static dev_link_t *ray_attach(void)
393 link->next = dev_list; 392 link->next = dev_list;
394 dev_list = link; 393 dev_list = link;
395 client_reg.dev_info = &dev_info; 394 client_reg.dev_info = &dev_info;
396 client_reg.EventMask =
397 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
398 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
399 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
400 client_reg.event_handler = &ray_event;
401 client_reg.Version = 0x0210; 395 client_reg.Version = 0x0210;
402 client_reg.event_callback_args.client_data = link; 396 client_reg.event_callback_args.client_data = link;
403 397
@@ -2916,6 +2910,7 @@ static struct pcmcia_driver ray_driver = {
2916 .name = "ray_cs", 2910 .name = "ray_cs",
2917 }, 2911 },
2918 .attach = ray_attach, 2912 .attach = ray_attach,
2913 .event = ray_event,
2919 .detach = ray_detach, 2914 .detach = ray_detach,
2920 .id_table = ray_ids, 2915 .id_table = ray_ids,
2921}; 2916};
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 89532fd92941..f6130a53b796 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4684,12 +4684,6 @@ wavelan_attach(void)
4684 4684
4685 /* Register with Card Services */ 4685 /* Register with Card Services */
4686 client_reg.dev_info = &dev_info; 4686 client_reg.dev_info = &dev_info;
4687 client_reg.EventMask =
4688 CS_EVENT_REGISTRATION_COMPLETE |
4689 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
4690 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
4691 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
4692 client_reg.event_handler = &wavelan_event;
4693 client_reg.Version = 0x0210; 4687 client_reg.Version = 0x0210;
4694 client_reg.event_callback_args.client_data = link; 4688 client_reg.event_callback_args.client_data = link;
4695 4689
@@ -4904,6 +4898,7 @@ static struct pcmcia_driver wavelan_driver = {
4904 .name = "wavelan_cs", 4898 .name = "wavelan_cs",
4905 }, 4899 },
4906 .attach = wavelan_attach, 4900 .attach = wavelan_attach,
4901 .event = wavelan_event,
4907 .detach = wavelan_detach, 4902 .detach = wavelan_detach,
4908 .id_table = wavelan_ids, 4903 .id_table = wavelan_ids,
4909}; 4904};
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
index ea2ef8dddb92..677ff71883cb 100644
--- a/drivers/net/wireless/wavelan_cs.p.h
+++ b/drivers/net/wireless/wavelan_cs.p.h
@@ -452,7 +452,6 @@
452#include <pcmcia/cistpl.h> 452#include <pcmcia/cistpl.h>
453#include <pcmcia/cisreg.h> 453#include <pcmcia/cisreg.h>
454#include <pcmcia/ds.h> 454#include <pcmcia/ds.h>
455#include <pcmcia/version.h>
456 455
457/* Wavelan declarations */ 456/* Wavelan declarations */
458#include "i82593.h" /* Definitions for the Intel chip */ 457#include "i82593.h" /* Definitions for the Intel chip */
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index e3a900482d92..dd902126d018 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -49,7 +49,6 @@
49 49
50#include <net/iw_handler.h> 50#include <net/iw_handler.h>
51 51
52#include <pcmcia/version.h>
53#include <pcmcia/cs_types.h> 52#include <pcmcia/cs_types.h>
54#include <pcmcia/cs.h> 53#include <pcmcia/cs.h>
55#include <pcmcia/cistpl.h> 54#include <pcmcia/cistpl.h>
@@ -2005,13 +2004,6 @@ static dev_link_t *wl3501_attach(void)
2005 link->next = wl3501_dev_list; 2004 link->next = wl3501_dev_list;
2006 wl3501_dev_list = link; 2005 wl3501_dev_list = link;
2007 client_reg.dev_info = &wl3501_dev_info; 2006 client_reg.dev_info = &wl3501_dev_info;
2008 client_reg.EventMask = CS_EVENT_CARD_INSERTION |
2009 CS_EVENT_RESET_PHYSICAL |
2010 CS_EVENT_CARD_RESET |
2011 CS_EVENT_CARD_REMOVAL |
2012 CS_EVENT_PM_SUSPEND |
2013 CS_EVENT_PM_RESUME;
2014 client_reg.event_handler = wl3501_event;
2015 client_reg.Version = 0x0210; 2007 client_reg.Version = 0x0210;
2016 client_reg.event_callback_args.client_data = link; 2008 client_reg.event_callback_args.client_data = link;
2017 ret = pcmcia_register_client(&link->handle, &client_reg); 2009 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -2246,12 +2238,13 @@ static struct pcmcia_device_id wl3501_ids[] = {
2246MODULE_DEVICE_TABLE(pcmcia, wl3501_ids); 2238MODULE_DEVICE_TABLE(pcmcia, wl3501_ids);
2247 2239
2248static struct pcmcia_driver wl3501_driver = { 2240static struct pcmcia_driver wl3501_driver = {
2249 .owner = THIS_MODULE, 2241 .owner = THIS_MODULE,
2250 .drv = { 2242 .drv = {
2251 .name = "wl3501_cs", 2243 .name = "wl3501_cs",
2252 }, 2244 },
2253 .attach = wl3501_attach, 2245 .attach = wl3501_attach,
2254 .detach = wl3501_detach, 2246 .event = wl3501_event,
2247 .detach = wl3501_detach,
2255 .id_table = wl3501_ids, 2248 .id_table = wl3501_ids,
2256}; 2249};
2257 2250