aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/net/bfin_mac.c2
-rw-r--r--drivers/net/bonding/bond_sysfs.c1
-rw-r--r--drivers/net/forcedeth.c18
-rw-r--r--drivers/net/ibm_newemac/core.c4
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/tulip/eeprom.c6
-rw-r--r--drivers/net/tulip/tulip_core.c7
-rw-r--r--drivers/net/usb/Kconfig2
-rw-r--r--drivers/net/usb/dm9601.c2
-rw-r--r--drivers/net/usb/pegasus.c4
-rw-r--r--drivers/net/wan/lapbether.c2
-rw-r--r--drivers/net/wireless/b43/dma.c7
-rw-r--r--drivers/net/wireless/b43/pcmcia.c6
-rw-r--r--drivers/net/wireless/libertas/if_cs.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c13
16 files changed, 51 insertions, 29 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 95d1b61342ec..da30a31e66f9 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2555,7 +2555,7 @@ config NIU
2555 2555
2556config PASEMI_MAC 2556config PASEMI_MAC
2557 tristate "PA Semi 1/10Gbit MAC" 2557 tristate "PA Semi 1/10Gbit MAC"
2558 depends on PPC64 && PCI 2558 depends on PPC_PASEMI && PCI
2559 select PHYLIB 2559 select PHYLIB
2560 select INET_LRO 2560 select INET_LRO
2561 help 2561 help
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c993a32b3f50..26b2dd5016cd 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -575,7 +575,6 @@ adjust_head:
575static int bf537mac_hard_start_xmit(struct sk_buff *skb, 575static int bf537mac_hard_start_xmit(struct sk_buff *skb,
576 struct net_device *dev) 576 struct net_device *dev)
577{ 577{
578 struct bf537mac_local *lp = netdev_priv(dev);
579 unsigned int data; 578 unsigned int data;
580 579
581 current_tx_ptr->skb = skb; 580 current_tx_ptr->skb = skb;
@@ -634,7 +633,6 @@ out:
634static void bf537mac_rx(struct net_device *dev) 633static void bf537mac_rx(struct net_device *dev)
635{ 634{
636 struct sk_buff *skb, *new_skb; 635 struct sk_buff *skb, *new_skb;
637 struct bf537mac_local *lp = netdev_priv(dev);
638 unsigned short len; 636 unsigned short len;
639 637
640 /* allocate a new skb for next time receive */ 638 /* allocate a new skb for next time receive */
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 90a1f31e8e63..979c2d05ff9c 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d,
341 341
342 if (command[0] == '-') { 342 if (command[0] == '-') {
343 dev = NULL; 343 dev = NULL;
344 original_mtu = 0;
344 bond_for_each_slave(bond, slave, i) 345 bond_for_each_slave(bond, slave, i)
345 if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) { 346 if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
346 dev = slave->dev; 347 dev = slave->dev;
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 0272afbdff37..4708a1631925 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -1854,6 +1854,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
1854 struct ring_desc* start_tx; 1854 struct ring_desc* start_tx;
1855 struct ring_desc* prev_tx; 1855 struct ring_desc* prev_tx;
1856 struct nv_skb_map* prev_tx_ctx; 1856 struct nv_skb_map* prev_tx_ctx;
1857 unsigned long flags;
1857 1858
1858 /* add fragments to entries count */ 1859 /* add fragments to entries count */
1859 for (i = 0; i < fragments; i++) { 1860 for (i = 0; i < fragments; i++) {
@@ -1863,10 +1864,10 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
1863 1864
1864 empty_slots = nv_get_empty_tx_slots(np); 1865 empty_slots = nv_get_empty_tx_slots(np);
1865 if (unlikely(empty_slots <= entries)) { 1866 if (unlikely(empty_slots <= entries)) {
1866 spin_lock_irq(&np->lock); 1867 spin_lock_irqsave(&np->lock, flags);
1867 netif_stop_queue(dev); 1868 netif_stop_queue(dev);
1868 np->tx_stop = 1; 1869 np->tx_stop = 1;
1869 spin_unlock_irq(&np->lock); 1870 spin_unlock_irqrestore(&np->lock, flags);
1870 return NETDEV_TX_BUSY; 1871 return NETDEV_TX_BUSY;
1871 } 1872 }
1872 1873
@@ -1929,13 +1930,13 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
1929 tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ? 1930 tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ?
1930 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; 1931 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;
1931 1932
1932 spin_lock_irq(&np->lock); 1933 spin_lock_irqsave(&np->lock, flags);
1933 1934
1934 /* set tx flags */ 1935 /* set tx flags */
1935 start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); 1936 start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra);
1936 np->put_tx.orig = put_tx; 1937 np->put_tx.orig = put_tx;
1937 1938
1938 spin_unlock_irq(&np->lock); 1939 spin_unlock_irqrestore(&np->lock, flags);
1939 1940
1940 dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n", 1941 dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n",
1941 dev->name, entries, tx_flags_extra); 1942 dev->name, entries, tx_flags_extra);
@@ -1971,6 +1972,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
1971 struct ring_desc_ex* prev_tx; 1972 struct ring_desc_ex* prev_tx;
1972 struct nv_skb_map* prev_tx_ctx; 1973 struct nv_skb_map* prev_tx_ctx;
1973 struct nv_skb_map* start_tx_ctx; 1974 struct nv_skb_map* start_tx_ctx;
1975 unsigned long flags;
1974 1976
1975 /* add fragments to entries count */ 1977 /* add fragments to entries count */
1976 for (i = 0; i < fragments; i++) { 1978 for (i = 0; i < fragments; i++) {
@@ -1980,10 +1982,10 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
1980 1982
1981 empty_slots = nv_get_empty_tx_slots(np); 1983 empty_slots = nv_get_empty_tx_slots(np);
1982 if (unlikely(empty_slots <= entries)) { 1984 if (unlikely(empty_slots <= entries)) {
1983 spin_lock_irq(&np->lock); 1985 spin_lock_irqsave(&np->lock, flags);
1984 netif_stop_queue(dev); 1986 netif_stop_queue(dev);
1985 np->tx_stop = 1; 1987 np->tx_stop = 1;
1986 spin_unlock_irq(&np->lock); 1988 spin_unlock_irqrestore(&np->lock, flags);
1987 return NETDEV_TX_BUSY; 1989 return NETDEV_TX_BUSY;
1988 } 1990 }
1989 1991
@@ -2059,7 +2061,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
2059 start_tx->txvlan = 0; 2061 start_tx->txvlan = 0;
2060 } 2062 }
2061 2063
2062 spin_lock_irq(&np->lock); 2064 spin_lock_irqsave(&np->lock, flags);
2063 2065
2064 if (np->tx_limit) { 2066 if (np->tx_limit) {
2065 /* Limit the number of outstanding tx. Setup all fragments, but 2067 /* Limit the number of outstanding tx. Setup all fragments, but
@@ -2085,7 +2087,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
2085 start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); 2087 start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra);
2086 np->put_tx.ex = put_tx; 2088 np->put_tx.ex = put_tx;
2087 2089
2088 spin_unlock_irq(&np->lock); 2090 spin_unlock_irqrestore(&np->lock, flags);
2089 2091
2090 dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n", 2092 dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n",
2091 dev->name, entries, tx_flags_extra); 2093 dev->name, entries, tx_flags_extra);
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 0789802d59ed..378a23963495 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -1242,8 +1242,8 @@ static int emac_close(struct net_device *ndev)
1242static inline u16 emac_tx_csum(struct emac_instance *dev, 1242static inline u16 emac_tx_csum(struct emac_instance *dev,
1243 struct sk_buff *skb) 1243 struct sk_buff *skb)
1244{ 1244{
1245 if (emac_has_feature(dev, EMAC_FTR_HAS_TAH && 1245 if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) &&
1246 skb->ip_summed == CHECKSUM_PARTIAL)) { 1246 (skb->ip_summed == CHECKSUM_PARTIAL)) {
1247 ++dev->stats.tx_packets_csum; 1247 ++dev->stats.tx_packets_csum;
1248 return EMAC_TX_CTRL_TAH_CSUM; 1248 return EMAC_TX_CTRL_TAH_CSUM;
1249 } 1249 }
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 268a288e0457..dcbe01b0ca0d 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -86,7 +86,7 @@
86#include "s2io.h" 86#include "s2io.h"
87#include "s2io-regs.h" 87#include "s2io-regs.h"
88 88
89#define DRV_VERSION "2.0.26.19" 89#define DRV_VERSION "2.0.26.20"
90 90
91/* S2io Driver name & version. */ 91/* S2io Driver name & version. */
92static char s2io_driver_name[] = "Neterion"; 92static char s2io_driver_name[] = "Neterion";
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
index 206918bad539..da2206f6021d 100644
--- a/drivers/net/tulip/eeprom.c
+++ b/drivers/net/tulip/eeprom.c
@@ -343,6 +343,12 @@ int __devinit tulip_read_eeprom(struct net_device *dev, int location, int addr_l
343 void __iomem *ee_addr = tp->base_addr + CSR9; 343 void __iomem *ee_addr = tp->base_addr + CSR9;
344 int read_cmd = location | (EE_READ_CMD << addr_len); 344 int read_cmd = location | (EE_READ_CMD << addr_len);
345 345
346 /* If location is past the end of what we can address, don't
347 * read some other location (ie truncate). Just return zero.
348 */
349 if (location > (1 << addr_len) - 1)
350 return 0;
351
346 iowrite32(EE_ENB & ~EE_CS, ee_addr); 352 iowrite32(EE_ENB & ~EE_CS, ee_addr);
347 iowrite32(EE_ENB, ee_addr); 353 iowrite32(EE_ENB, ee_addr);
348 354
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index ed600bf56e78..82f404b76d81 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1437,6 +1437,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1437 EEPROM. 1437 EEPROM.
1438 */ 1438 */
1439 ee_data = tp->eeprom; 1439 ee_data = tp->eeprom;
1440 memset(ee_data, 0, sizeof(tp->eeprom));
1440 sum = 0; 1441 sum = 0;
1441 if (chip_idx == LC82C168) { 1442 if (chip_idx == LC82C168) {
1442 for (i = 0; i < 3; i++) { 1443 for (i = 0; i < 3; i++) {
@@ -1458,8 +1459,12 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1458 /* A serial EEPROM interface, we read now and sort it out later. */ 1459 /* A serial EEPROM interface, we read now and sort it out later. */
1459 int sa_offset = 0; 1460 int sa_offset = 0;
1460 int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6; 1461 int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6;
1462 int ee_max_addr = ((1 << ee_addr_size) - 1) * sizeof(u16);
1461 1463
1462 for (i = 0; i < sizeof(tp->eeprom); i+=2) { 1464 if (ee_max_addr > sizeof(tp->eeprom))
1465 ee_max_addr = sizeof(tp->eeprom);
1466
1467 for (i = 0; i < ee_max_addr ; i += sizeof(u16)) {
1463 u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size); 1468 u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size);
1464 ee_data[i] = data & 0xff; 1469 ee_data[i] = data & 0xff;
1465 ee_data[i + 1] = data >> 8; 1470 ee_data[i + 1] = data >> 8;
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index a12c9c41b217..0604f3faf043 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -129,7 +129,7 @@ config USB_USBNET
129 129
130config USB_NET_AX8817X 130config USB_NET_AX8817X
131 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" 131 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters"
132 depends on USB_USBNET && NET_ETHERNET 132 depends on USB_USBNET
133 select CRC32 133 select CRC32
134 default y 134 default y
135 help 135 help
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 2968bb342ea3..f7319d326912 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -354,7 +354,7 @@ static void dm9601_set_multicast(struct net_device *net)
354 struct dev_mc_list *mc_list = net->mc_list; 354 struct dev_mc_list *mc_list = net->mc_list;
355 int i; 355 int i;
356 356
357 for (i = 0; i < net->mc_count; i++) { 357 for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) {
358 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; 358 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
359 hashes[crc >> 3] |= 1 << (crc & 0x7); 359 hashes[crc >> 3] |= 1 << (crc & 0x7);
360 } 360 }
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index d1ed68a11e70..b588c890ea70 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -1128,12 +1128,8 @@ pegasus_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
1128{ 1128{
1129 pegasus_t *pegasus; 1129 pegasus_t *pegasus;
1130 1130
1131 if (in_atomic())
1132 return 0;
1133
1134 pegasus = netdev_priv(dev); 1131 pegasus = netdev_priv(dev);
1135 mii_ethtool_gset(&pegasus->mii, ecmd); 1132 mii_ethtool_gset(&pegasus->mii, ecmd);
1136
1137 return 0; 1133 return 0;
1138} 1134}
1139 1135
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 629c909e05f9..b5860b97a93e 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -58,7 +58,7 @@ struct lapbethdev {
58 struct net_device_stats stats; /* some statistics */ 58 struct net_device_stats stats; /* some statistics */
59}; 59};
60 60
61static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices); 61static LIST_HEAD(lapbeth_devices);
62 62
63/* ------------------------------------------------------------------------ */ 63/* ------------------------------------------------------------------------ */
64 64
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 8a9776b52daf..70db0570adc5 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -574,6 +574,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
574 } 574 }
575 575
576 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { 576 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
577 b43err(ring->dev->wl, "RX DMA buffer allocation failed\n");
577 dev_kfree_skb_any(skb); 578 dev_kfree_skb_any(skb);
578 return -EIO; 579 return -EIO;
579 } 580 }
@@ -829,8 +830,12 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
829 DMA_TO_DEVICE); 830 DMA_TO_DEVICE);
830 831
831 if (b43_dma_mapping_error(ring, dma_test, 832 if (b43_dma_mapping_error(ring, dma_test,
832 b43_txhdr_size(dev), 1)) 833 b43_txhdr_size(dev), 1)) {
834
835 b43err(dev->wl,
836 "TXHDR DMA allocation failed\n");
833 goto err_kfree_txhdr_cache; 837 goto err_kfree_txhdr_cache;
838 }
834 } 839 }
835 840
836 dma_unmap_single(dev->dev->dev, 841 dma_unmap_single(dev->dev->dev,
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index b79a6bd5396d..371e4a119511 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -91,6 +91,8 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
91 91
92 dev->conf.ConfigBase = parse.config.base; 92 dev->conf.ConfigBase = parse.config.base;
93 dev->conf.Present = parse.config.rmask[0]; 93 dev->conf.Present = parse.config.rmask[0];
94 dev->conf.Attributes = CONF_ENABLE_IRQ;
95 dev->conf.IntType = INT_MEMORY_AND_IO;
94 96
95 dev->io.BasePort2 = 0; 97 dev->io.BasePort2 = 0;
96 dev->io.NumPorts2 = 0; 98 dev->io.NumPorts2 = 0;
@@ -112,8 +114,8 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
112 if (res != CS_SUCCESS) 114 if (res != CS_SUCCESS)
113 goto err_disable; 115 goto err_disable;
114 116
115 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FIRST_SHARED; 117 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
116 dev->irq.IRQInfo1 = IRQ_LEVEL_ID | IRQ_SHARE_ID; 118 dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
117 dev->irq.Handler = NULL; /* The handler is registered later. */ 119 dev->irq.Handler = NULL; /* The handler is registered later. */
118 dev->irq.Instance = NULL; 120 dev->irq.Instance = NULL;
119 res = pcmcia_request_irq(dev, &dev->irq); 121 res = pcmcia_request_irq(dev, &dev->irq);
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index d17746582160..53afebac7146 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -677,9 +677,7 @@ sbi_get_int_status_exit:
677 677
678 /* Card has a command result for us */ 678 /* Card has a command result for us */
679 if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { 679 if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) {
680 spin_lock(&priv->driver_lock);
681 ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len); 680 ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len);
682 spin_unlock(&priv->driver_lock);
683 if (ret < 0) 681 if (ret < 0)
684 lbs_pr_err("could not receive cmd from card\n"); 682 lbs_pr_err("could not receive cmd from card\n");
685 } 683 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 62b58a6261fe..50ea7bd0c922 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1252,11 +1252,20 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state)
1252 1252
1253exit: 1253exit:
1254 /* 1254 /*
1255 * Set device mode to sleep for power management. 1255 * Set device mode to sleep for power management,
1256 * on some hardware this call seems to consistently fail.
1257 * From the specifications it is hard to tell why it fails,
1258 * and if this is a "bad thing".
1259 * Overall it is safe to just ignore the failure and
1260 * continue suspending. The only downside is that the
1261 * device will not be in optimal power save mode, but with
1262 * the radio and the other components already disabled the
1263 * device is as good as disabled.
1256 */ 1264 */
1257 retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP); 1265 retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP);
1258 if (retval) 1266 if (retval)
1259 return retval; 1267 WARNING(rt2x00dev, "Device failed to enter sleep state, "
1268 "continue suspending.\n");
1260 1269
1261 return 0; 1270 return 0;
1262} 1271}