aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/net/chelsio/suni1x10gexp_regs.h2
-rw-r--r--drivers/net/forcedeth.c2
-rw-r--r--drivers/net/meth.c68
-rw-r--r--drivers/net/phy/fixed.c4
-rw-r--r--drivers/net/spider_net.c6
-rw-r--r--drivers/net/ucc_geth.c3
-rw-r--r--drivers/net/ucc_geth_mii.c2
-rw-r--r--drivers/net/usb/asix.c4
-rw-r--r--drivers/net/wireless/libertas/decl.h2
-rw-r--r--drivers/net/wireless/libertas/fw.c14
-rw-r--r--drivers/net/wireless/libertas/rx.c24
12 files changed, 74 insertions, 59 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c5baa197bc08..30fd479fea5e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2218,7 +2218,7 @@ config SK98LIN
2218 2218
2219config VIA_VELOCITY 2219config VIA_VELOCITY
2220 tristate "VIA Velocity support" 2220 tristate "VIA Velocity support"
2221 depends on NET_PCI && PCI 2221 depends on PCI
2222 select CRC32 2222 select CRC32
2223 select CRC_CCITT 2223 select CRC_CCITT
2224 select MII 2224 select MII
diff --git a/drivers/net/chelsio/suni1x10gexp_regs.h b/drivers/net/chelsio/suni1x10gexp_regs.h
index 269d097dd927..d0f87d82566a 100644
--- a/drivers/net/chelsio/suni1x10gexp_regs.h
+++ b/drivers/net/chelsio/suni1x10gexp_regs.h
@@ -105,7 +105,7 @@
105#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_LOW(filterId) (0x204A + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) 105#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_LOW(filterId) (0x204A + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId))
106#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_MID(filterId) (0x204B + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) 106#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_MID(filterId) (0x204B + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId))
107#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_HIGH(filterId)(0x204C + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) 107#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_HIGH(filterId)(0x204C + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId))
108#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID(filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId) 108#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID(filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId))
109#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_LOW 0x204A 109#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_LOW 0x204A
110#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_MID 0x204B 110#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_MID 0x204B
111#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_HIGH 0x204C 111#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_HIGH 0x204C
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 7a018027fcc0..4154fd000746 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -195,7 +195,7 @@ enum {
195#define NVREG_IRQ_TX_FORCED 0x0100 195#define NVREG_IRQ_TX_FORCED 0x0100
196#define NVREG_IRQ_RECOVER_ERROR 0x8000 196#define NVREG_IRQ_RECOVER_ERROR 0x8000
197#define NVREG_IRQMASK_THROUGHPUT 0x00df 197#define NVREG_IRQMASK_THROUGHPUT 0x00df
198#define NVREG_IRQMASK_CPU 0x0040 198#define NVREG_IRQMASK_CPU 0x0060
199#define NVREG_IRQ_TX_ALL (NVREG_IRQ_TX_ERR|NVREG_IRQ_TX_OK|NVREG_IRQ_TX_FORCED) 199#define NVREG_IRQ_TX_ALL (NVREG_IRQ_TX_ERR|NVREG_IRQ_TX_OK|NVREG_IRQ_TX_FORCED)
200#define NVREG_IRQ_RX_ALL (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_RX_FORCED) 200#define NVREG_IRQ_RX_ALL (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_RX_FORCED)
201#define NVREG_IRQ_OTHER (NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_RECOVER_ERROR) 201#define NVREG_IRQ_OTHER (NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_RECOVER_ERROR)
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 0343ea12b299..92b403bf38b0 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -8,15 +8,16 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/module.h>
12#include <linux/init.h>
13
14#include <linux/kernel.h> /* printk() */
15#include <linux/delay.h> 11#include <linux/delay.h>
12#include <linux/dma-mapping.h>
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/platform_device.h>
16#include <linux/slab.h> 17#include <linux/slab.h>
17#include <linux/errno.h> /* error codes */ 18#include <linux/errno.h>
18#include <linux/types.h> /* size_t */ 19#include <linux/types.h>
19#include <linux/interrupt.h> /* mark_bh */ 20#include <linux/interrupt.h>
20 21
21#include <linux/in.h> 22#include <linux/in.h>
22#include <linux/in6.h> 23#include <linux/in6.h>
@@ -33,7 +34,6 @@
33 34
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/scatterlist.h> 36#include <asm/scatterlist.h>
36#include <linux/dma-mapping.h>
37 37
38#include "meth.h" 38#include "meth.h"
39 39
@@ -51,8 +51,6 @@
51 51
52 52
53static const char *meth_str="SGI O2 Fast Ethernet"; 53static const char *meth_str="SGI O2 Fast Ethernet";
54MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>");
55MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver");
56 54
57#define HAVE_TX_TIMEOUT 55#define HAVE_TX_TIMEOUT
58/* The maximum time waited (in jiffies) before assuming a Tx failed. (400ms) */ 56/* The maximum time waited (in jiffies) before assuming a Tx failed. (400ms) */
@@ -784,15 +782,15 @@ static struct net_device_stats *meth_stats(struct net_device *dev)
784/* 782/*
785 * The init function. 783 * The init function.
786 */ 784 */
787static struct net_device *meth_init(void) 785static int __init meth_probe(struct platform_device *pdev)
788{ 786{
789 struct net_device *dev; 787 struct net_device *dev;
790 struct meth_private *priv; 788 struct meth_private *priv;
791 int ret; 789 int err;
792 790
793 dev = alloc_etherdev(sizeof(struct meth_private)); 791 dev = alloc_etherdev(sizeof(struct meth_private));
794 if (!dev) 792 if (!dev)
795 return ERR_PTR(-ENOMEM); 793 return -ENOMEM;
796 794
797 dev->open = meth_open; 795 dev->open = meth_open;
798 dev->stop = meth_release; 796 dev->stop = meth_release;
@@ -808,11 +806,12 @@ static struct net_device *meth_init(void)
808 806
809 priv = netdev_priv(dev); 807 priv = netdev_priv(dev);
810 spin_lock_init(&priv->meth_lock); 808 spin_lock_init(&priv->meth_lock);
809 SET_NETDEV_DEV(dev, &pdev->dev);
811 810
812 ret = register_netdev(dev); 811 err = register_netdev(dev);
813 if (ret) { 812 if (err) {
814 free_netdev(dev); 813 free_netdev(dev);
815 return ERR_PTR(ret); 814 return err;
816 } 815 }
817 816
818 printk(KERN_INFO "%s: SGI MACE Ethernet rev. %d\n", 817 printk(KERN_INFO "%s: SGI MACE Ethernet rev. %d\n",
@@ -820,21 +819,44 @@ static struct net_device *meth_init(void)
820 return 0; 819 return 0;
821} 820}
822 821
823static struct net_device *meth_dev; 822static int __exit meth_remove(struct platform_device *pdev)
823{
824 struct net_device *dev = platform_get_drvdata(pdev);
825
826 unregister_netdev(dev);
827 free_netdev(dev);
828 platform_set_drvdata(pdev, NULL);
829
830 return 0;
831}
832
833static struct platform_driver meth_driver = {
834 .probe = meth_probe,
835 .remove = __devexit_p(meth_remove),
836 .driver = {
837 .name = "meth",
838 }
839};
824 840
825static int __init meth_init_module(void) 841static int __init meth_init_module(void)
826{ 842{
827 meth_dev = meth_init(); 843 int err;
828 if (IS_ERR(meth_dev)) 844
829 return PTR_ERR(meth_dev); 845 err = platform_driver_register(&meth_driver);
830 return 0; 846 if (err)
847 printk(KERN_ERR "Driver registration failed\n");
848
849 return err;
831} 850}
832 851
833static void __exit meth_exit_module(void) 852static void __exit meth_exit_module(void)
834{ 853{
835 unregister_netdev(meth_dev); 854 platform_driver_unregister(&meth_driver);
836 free_netdev(meth_dev);
837} 855}
838 856
839module_init(meth_init_module); 857module_init(meth_init_module);
840module_exit(meth_exit_module); 858module_exit(meth_exit_module);
859
860MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>");
861MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver");
862MODULE_LICENSE("GPL");
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 68c99b4c5255..bb966911a137 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -89,6 +89,7 @@ EXPORT_SYMBOL(fixed_mdio_set_link_update);
89/*----------------------------------------------------------------------------- 89/*-----------------------------------------------------------------------------
90 * This is used for updating internal mii regs from the status 90 * This is used for updating internal mii regs from the status
91 *-----------------------------------------------------------------------------*/ 91 *-----------------------------------------------------------------------------*/
92#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX)
92static int fixed_mdio_update_regs(struct fixed_info *fixed) 93static int fixed_mdio_update_regs(struct fixed_info *fixed)
93{ 94{
94 u16 *regs = fixed->regs; 95 u16 *regs = fixed->regs;
@@ -165,6 +166,7 @@ static int fixed_mii_reset(struct mii_bus *bus)
165 /*nothing here - no way/need to reset it*/ 166 /*nothing here - no way/need to reset it*/
166 return 0; 167 return 0;
167} 168}
169#endif
168 170
169static int fixed_config_aneg(struct phy_device *phydev) 171static int fixed_config_aneg(struct phy_device *phydev)
170{ 172{
@@ -194,6 +196,7 @@ static struct phy_driver fixed_mdio_driver = {
194 * number is used to create multiple fixed PHYs, so that several devices can 196 * number is used to create multiple fixed PHYs, so that several devices can
195 * utilize them simultaneously. 197 * utilize them simultaneously.
196 *-----------------------------------------------------------------------------*/ 198 *-----------------------------------------------------------------------------*/
199#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX)
197static int fixed_mdio_register_device(int number, int speed, int duplex) 200static int fixed_mdio_register_device(int number, int speed, int duplex)
198{ 201{
199 struct mii_bus *new_bus; 202 struct mii_bus *new_bus;
@@ -301,6 +304,7 @@ device_create_fail:
301 304
302 return err; 305 return err;
303} 306}
307#endif
304 308
305 309
306MODULE_DESCRIPTION("Fixed PHY device & driver for PAL"); 310MODULE_DESCRIPTION("Fixed PHY device & driver for PAL");
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index c3964c3d89d9..ef84d7c757a0 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1014,12 +1014,12 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,
1014 */ 1014 */
1015 } 1015 }
1016 1016
1017 /* pass skb up to stack */
1018 netif_receive_skb(skb);
1019
1020 /* update netdevice statistics */ 1017 /* update netdevice statistics */
1021 card->netdev_stats.rx_packets++; 1018 card->netdev_stats.rx_packets++;
1022 card->netdev_stats.rx_bytes += skb->len; 1019 card->netdev_stats.rx_bytes += skb->len;
1020
1021 /* pass skb up to stack */
1022 netif_receive_skb(skb);
1023} 1023}
1024 1024
1025#ifdef DEBUG 1025#ifdef DEBUG
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index c2ccbd098f53..18b731bb4da1 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -23,11 +23,8 @@
23#include <linux/skbuff.h> 23#include <linux/skbuff.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/ethtool.h>
27#include <linux/delay.h>
28#include <linux/dma-mapping.h> 26#include <linux/dma-mapping.h>
29#include <linux/fsl_devices.h> 27#include <linux/fsl_devices.h>
30#include <linux/ethtool.h>
31#include <linux/mii.h> 28#include <linux/mii.h>
32#include <linux/phy.h> 29#include <linux/phy.h>
33#include <linux/workqueue.h> 30#include <linux/workqueue.h>
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index f96966d4bcc2..7bcb82f50cf7 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/drivers/net/ucc_geth_mii.c
@@ -260,8 +260,6 @@ static struct of_device_id uec_mdio_match[] = {
260 {}, 260 {},
261}; 261};
262 262
263MODULE_DEVICE_TABLE(of, uec_mdio_match);
264
265static struct of_platform_driver uec_mdio_driver = { 263static struct of_platform_driver uec_mdio_driver = {
266 .name = DRV_NAME, 264 .name = DRV_NAME,
267 .probe = uec_mdio_probe, 265 .probe = uec_mdio_probe,
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index d5ef97bc4d01..6d95cacd5284 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1458,6 +1458,10 @@ static const struct usb_device_id products [] = {
1458 // IO-DATA ETG-US2 1458 // IO-DATA ETG-US2
1459 USB_DEVICE (0x04bb, 0x0930), 1459 USB_DEVICE (0x04bb, 0x0930),
1460 .driver_info = (unsigned long) &ax88178_info, 1460 .driver_info = (unsigned long) &ax88178_info,
1461}, {
1462 // Belkin F5D5055
1463 USB_DEVICE(0x050d, 0x5055),
1464 .driver_info = (unsigned long) &ax88178_info,
1461}, 1465},
1462 { }, // END 1466 { }, // END
1463}; 1467};
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 606bdd002be7..dfe27642322c 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -46,7 +46,7 @@ u32 libertas_index_to_data_rate(u8 index);
46u8 libertas_data_rate_to_index(u32 rate); 46u8 libertas_data_rate_to_index(u32 rate);
47void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen); 47void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
48 48
49int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); 49void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
50 50
51/** The proc fs interface */ 51/** The proc fs interface */
52int libertas_process_rx_command(wlan_private * priv); 52int libertas_process_rx_command(wlan_private * priv);
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c
index 441123c85e62..5c63c9b1659c 100644
--- a/drivers/net/wireless/libertas/fw.c
+++ b/drivers/net/wireless/libertas/fw.c
@@ -333,18 +333,22 @@ static void command_timer_fn(unsigned long data)
333 unsigned long flags; 333 unsigned long flags;
334 334
335 ptempnode = adapter->cur_cmd; 335 ptempnode = adapter->cur_cmd;
336 if (ptempnode == NULL) {
337 lbs_pr_debug(1, "PTempnode Empty\n");
338 return;
339 }
340
336 cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr; 341 cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr;
342 if (!cmd) {
343 lbs_pr_debug(1, "cmd is NULL\n");
344 return;
345 }
337 346
338 lbs_pr_info("command_timer_fn fired (%x)\n", cmd->command); 347 lbs_pr_info("command_timer_fn fired (%x)\n", cmd->command);
339 348
340 if (!adapter->fw_ready) 349 if (!adapter->fw_ready)
341 return; 350 return;
342 351
343 if (ptempnode == NULL) {
344 lbs_pr_debug(1, "PTempnode Empty\n");
345 return;
346 }
347
348 spin_lock_irqsave(&adapter->driver_lock, flags); 352 spin_lock_irqsave(&adapter->driver_lock, flags);
349 adapter->cur_cmd = NULL; 353 adapter->cur_cmd = NULL;
350 spin_unlock_irqrestore(&adapter->driver_lock, flags); 354 spin_unlock_irqrestore(&adapter->driver_lock, flags);
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index d17924f764e5..96619a32951b 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -136,7 +136,7 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd)
136 LEAVE(); 136 LEAVE();
137} 137}
138 138
139int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) 139void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
140{ 140{
141 lbs_pr_debug(1, "skb->data=%p\n", skb->data); 141 lbs_pr_debug(1, "skb->data=%p\n", skb->data);
142 142
@@ -148,8 +148,6 @@ int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
148 skb->ip_summed = CHECKSUM_UNNECESSARY; 148 skb->ip_summed = CHECKSUM_UNNECESSARY;
149 149
150 netif_rx(skb); 150 netif_rx(skb);
151
152 return 0;
153} 151}
154 152
155/** 153/**
@@ -269,15 +267,11 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
269 wlan_compute_rssi(priv, p_rx_pd); 267 wlan_compute_rssi(priv, p_rx_pd);
270 268
271 lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); 269 lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len);
272 if (libertas_upload_rx_packet(priv, skb)) {
273 lbs_pr_debug(1, "RX error: libertas_upload_rx_packet"
274 " returns failure\n");
275 ret = -1;
276 goto done;
277 }
278 priv->stats.rx_bytes += skb->len; 270 priv->stats.rx_bytes += skb->len;
279 priv->stats.rx_packets++; 271 priv->stats.rx_packets++;
280 272
273 libertas_upload_rx_packet(priv, skb);
274
281 ret = 0; 275 ret = 0;
282done: 276done:
283 LEAVE(); 277 LEAVE();
@@ -438,22 +432,14 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
438 wlan_compute_rssi(priv, prxpd); 432 wlan_compute_rssi(priv, prxpd);
439 433
440 lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); 434 lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len);
441
442 if (libertas_upload_rx_packet(priv, skb)) {
443 lbs_pr_debug(1, "RX error: libertas_upload_rx_packet "
444 "returns failure\n");
445 ret = -1;
446 goto done;
447 }
448
449 priv->stats.rx_bytes += skb->len; 435 priv->stats.rx_bytes += skb->len;
450 priv->stats.rx_packets++; 436 priv->stats.rx_packets++;
451 437
438 libertas_upload_rx_packet(priv, skb);
439
452 ret = 0; 440 ret = 0;
453done: 441done:
454 LEAVE(); 442 LEAVE();
455 443
456 skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
457
458 return (ret); 444 return (ret);
459} 445}