diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-07-13 19:11:44 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-07-13 19:11:44 -0400 |
commit | 08cd84c81f27d5bd22ba958b7cae6d566c509280 (patch) | |
tree | 6fdb546c151410851fd3c604d42590afa4215084 /drivers/net | |
parent | e9dd2561793c05d70c9df1bc16a2dde6f23388df (diff) | |
parent | 327309e899662b482c58cf25f574513d38b5788c (diff) |
Merge /spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'drivers/net')
46 files changed, 243 insertions, 206 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 2b55687f6ee9..9a07ff7a7777 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -3,6 +3,8 @@ | |||
3 | # Network device configuration | 3 | # Network device configuration |
4 | # | 4 | # |
5 | 5 | ||
6 | menu "Network device support" | ||
7 | |||
6 | config NETDEVICES | 8 | config NETDEVICES |
7 | depends on NET | 9 | depends on NET |
8 | bool "Network device support" | 10 | bool "Network device support" |
@@ -2547,3 +2549,4 @@ config NETCONSOLE | |||
2547 | If you want to log kernel messages over the network, enable this. | 2549 | If you want to log kernel messages over the network, enable this. |
2548 | See <file:Documentation/networking/netconsole.txt> for details. | 2550 | See <file:Documentation/networking/netconsole.txt> for details. |
2549 | 2551 | ||
2552 | endmenu | ||
diff --git a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig index 69c488d933a2..b14e89004c3a 100644 --- a/drivers/net/appletalk/Kconfig +++ b/drivers/net/appletalk/Kconfig | |||
@@ -1,6 +1,33 @@ | |||
1 | # | 1 | # |
2 | # Appletalk driver configuration | 2 | # Appletalk driver configuration |
3 | # | 3 | # |
4 | config ATALK | ||
5 | tristate "Appletalk protocol support" | ||
6 | select LLC | ||
7 | ---help--- | ||
8 | AppleTalk is the protocol that Apple computers can use to communicate | ||
9 | on a network. If your Linux box is connected to such a network and you | ||
10 | wish to connect to it, say Y. You will need to use the netatalk package | ||
11 | so that your Linux box can act as a print and file server for Macs as | ||
12 | well as access AppleTalk printers. Check out | ||
13 | <http://www.zettabyte.net/netatalk/> on the WWW for details. | ||
14 | EtherTalk is the name used for AppleTalk over Ethernet and the | ||
15 | cheaper and slower LocalTalk is AppleTalk over a proprietary Apple | ||
16 | network using serial links. EtherTalk and LocalTalk are fully | ||
17 | supported by Linux. | ||
18 | |||
19 | General information about how to connect Linux, Windows machines and | ||
20 | Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>. The | ||
21 | NET-3-HOWTO, available from | ||
22 | <http://www.tldp.org/docs.html#howto>, contains valuable | ||
23 | information as well. | ||
24 | |||
25 | To compile this driver as a module, choose M here: the module will be | ||
26 | called appletalk. You almost certainly want to compile it as a | ||
27 | module so you can restart your AppleTalk stack without rebooting | ||
28 | your machine. I hear that the GNU boycott of Apple is over, so | ||
29 | even politically correct people are allowed to say Y here. | ||
30 | |||
4 | config DEV_APPLETALK | 31 | config DEV_APPLETALK |
5 | bool "Appletalk interfaces support" | 32 | bool "Appletalk interfaces support" |
6 | depends on ATALK | 33 | depends on ATALK |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index f1bd45e3da31..94939f570f78 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1930,6 +1930,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1930 | b44_free_rings(bp); | 1930 | b44_free_rings(bp); |
1931 | 1931 | ||
1932 | spin_unlock_irq(&bp->lock); | 1932 | spin_unlock_irq(&bp->lock); |
1933 | pci_disable_device(pdev); | ||
1933 | return 0; | 1934 | return 0; |
1934 | } | 1935 | } |
1935 | 1936 | ||
@@ -1939,6 +1940,8 @@ static int b44_resume(struct pci_dev *pdev) | |||
1939 | struct b44 *bp = netdev_priv(dev); | 1940 | struct b44 *bp = netdev_priv(dev); |
1940 | 1941 | ||
1941 | pci_restore_state(pdev); | 1942 | pci_restore_state(pdev); |
1943 | pci_enable_device(pdev); | ||
1944 | pci_set_master(pdev); | ||
1942 | 1945 | ||
1943 | if (!netif_running(dev)) | 1946 | if (!netif_running(dev)) |
1944 | return 0; | 1947 | return 0; |
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 | ||
1264 | static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_match *match) | 1264 | static 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 | ||
1648 | static struct of_match bmac_match[] = | 1648 | static 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 | ||
112 | static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *match) | 112 | static 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 | ||
1012 | static struct of_match mace_match[] = | 1012 | static 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/myri_sbus.c b/drivers/net/myri_sbus.c index aad5494c83cf..f0996ce5c268 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -369,7 +369,7 @@ static void myri_tx(struct myri_eth *mp, struct net_device *dev) | |||
369 | * assume 802.3 if the type field is short enough to be a length. | 369 | * assume 802.3 if the type field is short enough to be a length. |
370 | * This is normal practice and works for any 'now in use' protocol. | 370 | * This is normal practice and works for any 'now in use' protocol. |
371 | */ | 371 | */ |
372 | static unsigned short myri_type_trans(struct sk_buff *skb, struct net_device *dev) | 372 | static __be16 myri_type_trans(struct sk_buff *skb, struct net_device *dev) |
373 | { | 373 | { |
374 | struct ethhdr *eth; | 374 | struct ethhdr *eth; |
375 | unsigned char *rawp; | 375 | unsigned char *rawp; |
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index a1a6c08e7dcf..f1c01ac29102 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c | |||
@@ -660,6 +660,7 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
660 | 660 | ||
661 | netif_device_detach(dev); | 661 | netif_device_detach(dev); |
662 | pci_save_state(pdev); | 662 | pci_save_state(pdev); |
663 | pci_disable_device(pdev); | ||
663 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 664 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
664 | 665 | ||
665 | return 0; | 666 | return 0; |
@@ -671,6 +672,8 @@ static int ne2k_pci_resume (struct pci_dev *pdev) | |||
671 | 672 | ||
672 | pci_set_power_state(pdev, 0); | 673 | pci_set_power_state(pdev, 0); |
673 | pci_restore_state(pdev); | 674 | pci_restore_state(pdev); |
675 | pci_enable_device(pdev); | ||
676 | pci_set_master(pdev); | ||
674 | NS8390_init(dev, 1); | 677 | NS8390_init(dev, 1); |
675 | netif_device_attach(dev); | 678 | netif_device_attach(dev); |
676 | 679 | ||
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/plip.c b/drivers/net/plip.c index f4b62405d2e5..21537ee3a6a7 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -540,7 +540,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev, | |||
540 | * in far too many old systems not all even running Linux. | 540 | * in far too many old systems not all even running Linux. |
541 | */ | 541 | */ |
542 | 542 | ||
543 | static unsigned short plip_type_trans(struct sk_buff *skb, struct net_device *dev) | 543 | static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) |
544 | { | 544 | { |
545 | struct ethhdr *eth; | 545 | struct ethhdr *eth; |
546 | unsigned char *rawp; | 546 | unsigned char *rawp; |
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 | |||
338 | static 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) | |||
375 | static int shaper_close(struct net_device *dev) | 356 | static 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 |
3262 | static int skge_suspend(struct pci_dev *pdev, u32 state) | 3262 | static 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) | |||
281 | static int bcm5421_init(struct mii_phy* phy) | 285 | static 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 | ||
310 | static 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 */ |
764 | static struct mii_phy_ops bcm5421k2_phy_ops = { | 777 | static 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 */ | ||
796 | static 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 | |||
805 | static 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 | ||
5119 | static void __tg3_set_rx_mode(struct net_device *); | 5119 | static void __tg3_set_rx_mode(struct net_device *); |
5120 | static void tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) | 5120 | static 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 | ||
7824 | static 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 | |||
7824 | static struct ethtool_ops tg3_ethtool_ops = { | 7878 | static 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 | ||
7861 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) | 7916 | static 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 | ||
9805 | static int __devinit tg3_init_one(struct pci_dev *pdev, | 9866 | static 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 | ||
1914 | static int | 1914 | static 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/wan/farsync.c b/drivers/net/wan/farsync.c index 7217d44e8854..2c83cca34b86 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -861,8 +861,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port, | |||
861 | /* | 861 | /* |
862 | * Mark it for our own raw sockets interface | 862 | * Mark it for our own raw sockets interface |
863 | */ | 863 | */ |
864 | static unsigned short farsync_type_trans(struct sk_buff *skb, | 864 | static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev) |
865 | struct net_device *dev) | ||
866 | { | 865 | { |
867 | skb->dev = dev; | 866 | skb->dev = dev; |
868 | skb->mac.raw = skb->data; | 867 | skb->mac.raw = skb->data; |
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 87496843681a..48c03c11cd9a 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -91,8 +91,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | static unsigned short cisco_type_trans(struct sk_buff *skb, | 94 | static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev) |
95 | struct net_device *dev) | ||
96 | { | 95 | { |
97 | hdlc_header *data = (hdlc_header*)skb->data; | 96 | hdlc_header *data = (hdlc_header*)skb->data; |
98 | 97 | ||
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 7cd6195a2e46..b81263eaede0 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -66,8 +66,7 @@ static void ppp_close(struct net_device *dev) | |||
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | static unsigned short ppp_type_trans(struct sk_buff *skb, | 69 | static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev) |
70 | struct net_device *dev) | ||
71 | { | 70 | { |
72 | return __constant_htons(ETH_P_WAN_PPP); | 71 | return __constant_htons(ETH_P_WAN_PPP); |
73 | } | 72 | } |
diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index c41fb70b6929..9456d31cb1c1 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c | |||
@@ -24,8 +24,7 @@ | |||
24 | #include <linux/hdlc.h> | 24 | #include <linux/hdlc.h> |
25 | 25 | ||
26 | 26 | ||
27 | static unsigned short raw_type_trans(struct sk_buff *skb, | 27 | static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev) |
28 | struct net_device *dev) | ||
29 | { | 28 | { |
30 | return __constant_htons(ETH_P_IP); | 29 | return __constant_htons(ETH_P_IP); |
31 | } | 30 | } |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 758b48ba65ce..6110187668dc 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2381,7 +2381,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) | |||
2381 | /* | 2381 | /* |
2382 | * Clean out tx queue | 2382 | * Clean out tx queue |
2383 | */ | 2383 | */ |
2384 | if (test_bit(FLAG_MPI, &ai->flags) && skb_queue_len (&ai->txq) > 0) { | 2384 | if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) { |
2385 | struct sk_buff *skb = NULL; | 2385 | struct sk_buff *skb = NULL; |
2386 | for (;(skb = skb_dequeue(&ai->txq));) | 2386 | for (;(skb = skb_dequeue(&ai->txq));) |
2387 | dev_kfree_skb(skb); | 2387 | dev_kfree_skb(skb); |
@@ -3294,7 +3294,7 @@ exitrx: | |||
3294 | if (status & EV_TXEXC) | 3294 | if (status & EV_TXEXC) |
3295 | get_tx_error(apriv, -1); | 3295 | get_tx_error(apriv, -1); |
3296 | spin_lock_irqsave(&apriv->aux_lock, flags); | 3296 | spin_lock_irqsave(&apriv->aux_lock, flags); |
3297 | if (skb_queue_len (&apriv->txq)) { | 3297 | if (!skb_queue_empty(&apriv->txq)) { |
3298 | spin_unlock_irqrestore(&apriv->aux_lock,flags); | 3298 | spin_unlock_irqrestore(&apriv->aux_lock,flags); |
3299 | mpi_send_packet (dev); | 3299 | mpi_send_packet (dev); |
3300 | } else { | 3300 | } 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 | ||
186 | static int | 186 | static int |
187 | airport_attach(struct macio_dev *mdev, const struct of_match *match) | 187 | airport_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>"); | |||
266 | MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); | 266 | MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); |
267 | MODULE_LICENSE("Dual MPL/GPL"); | 267 | MODULE_LICENSE("Dual MPL/GPL"); |
268 | 268 | ||
269 | static struct of_match airport_match[] = | 269 | static 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 | ||
277 | MODULE_DEVICE_TABLE (of, airport_match); | ||
278 | |||
279 | static struct macio_driver airport_driver = | 279 | static 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[] = { | |||
668 | MODULE_DEVICE_TABLE(pcmcia, atmel_ids); | 662 | MODULE_DEVICE_TABLE(pcmcia, atmel_ids); |
669 | 663 | ||
670 | static struct pcmcia_driver atmel_driver = { | 664 | static 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 fe54571bc121..183c4732ef65 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -4690,12 +4690,6 @@ wavelan_attach(void) | |||
4690 | 4690 | ||
4691 | /* Register with Card Services */ | 4691 | /* Register with Card Services */ |
4692 | client_reg.dev_info = &dev_info; | 4692 | client_reg.dev_info = &dev_info; |
4693 | client_reg.EventMask = | ||
4694 | CS_EVENT_REGISTRATION_COMPLETE | | ||
4695 | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | | ||
4696 | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | | ||
4697 | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; | ||
4698 | client_reg.event_handler = &wavelan_event; | ||
4699 | client_reg.Version = 0x0210; | 4693 | client_reg.Version = 0x0210; |
4700 | client_reg.event_callback_args.client_data = link; | 4694 | client_reg.event_callback_args.client_data = link; |
4701 | 4695 | ||
@@ -4910,6 +4904,7 @@ static struct pcmcia_driver wavelan_driver = { | |||
4910 | .name = "wavelan_cs", | 4904 | .name = "wavelan_cs", |
4911 | }, | 4905 | }, |
4912 | .attach = wavelan_attach, | 4906 | .attach = wavelan_attach, |
4907 | .event = wavelan_event, | ||
4913 | .detach = wavelan_detach, | 4908 | .detach = wavelan_detach, |
4914 | .id_table = wavelan_ids, | 4909 | .id_table = wavelan_ids, |
4915 | }; | 4910 | }; |
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h index 4ac359ed5b51..01d882be8790 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 77d8ac858036..7cc5edbf6ede 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> |
@@ -2006,13 +2005,6 @@ static dev_link_t *wl3501_attach(void) | |||
2006 | link->next = wl3501_dev_list; | 2005 | link->next = wl3501_dev_list; |
2007 | wl3501_dev_list = link; | 2006 | wl3501_dev_list = link; |
2008 | client_reg.dev_info = &wl3501_dev_info; | 2007 | client_reg.dev_info = &wl3501_dev_info; |
2009 | client_reg.EventMask = CS_EVENT_CARD_INSERTION | | ||
2010 | CS_EVENT_RESET_PHYSICAL | | ||
2011 | CS_EVENT_CARD_RESET | | ||
2012 | CS_EVENT_CARD_REMOVAL | | ||
2013 | CS_EVENT_PM_SUSPEND | | ||
2014 | CS_EVENT_PM_RESUME; | ||
2015 | client_reg.event_handler = wl3501_event; | ||
2016 | client_reg.Version = 0x0210; | 2008 | client_reg.Version = 0x0210; |
2017 | client_reg.event_callback_args.client_data = link; | 2009 | client_reg.event_callback_args.client_data = link; |
2018 | ret = pcmcia_register_client(&link->handle, &client_reg); | 2010 | ret = pcmcia_register_client(&link->handle, &client_reg); |
@@ -2247,12 +2239,13 @@ static struct pcmcia_device_id wl3501_ids[] = { | |||
2247 | MODULE_DEVICE_TABLE(pcmcia, wl3501_ids); | 2239 | MODULE_DEVICE_TABLE(pcmcia, wl3501_ids); |
2248 | 2240 | ||
2249 | static struct pcmcia_driver wl3501_driver = { | 2241 | static struct pcmcia_driver wl3501_driver = { |
2250 | .owner = THIS_MODULE, | 2242 | .owner = THIS_MODULE, |
2251 | .drv = { | 2243 | .drv = { |
2252 | .name = "wl3501_cs", | 2244 | .name = "wl3501_cs", |
2253 | }, | 2245 | }, |
2254 | .attach = wl3501_attach, | 2246 | .attach = wl3501_attach, |
2255 | .detach = wl3501_detach, | 2247 | .event = wl3501_event, |
2248 | .detach = wl3501_detach, | ||
2256 | .id_table = wl3501_ids, | 2249 | .id_table = wl3501_ids, |
2257 | }; | 2250 | }; |
2258 | 2251 | ||