aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-28 22:44:58 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-28 22:44:58 -0400
commit98846b5e2363e96a2b821e211bf0169afb38a54a (patch)
tree7548a8de8c96e089a8e2687ecbe07c58c5ea8371 /drivers/net
parente8e16b706e8406f1ab3bccab16932ebc513896d8 (diff)
parentbd6ca6375b9f18f40e814f391d9d1abaa916bc72 (diff)
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/net/bfin_mac.c2
-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
10 files changed, 28 insertions, 21 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index fe7b5ec09708..3a0b20afec7b 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2635,7 +2635,7 @@ config NIU
2635 2635
2636config PASEMI_MAC 2636config PASEMI_MAC
2637 tristate "PA Semi 1/10Gbit MAC" 2637 tristate "PA Semi 1/10Gbit MAC"
2638 depends on PPC64 && PCI 2638 depends on PPC_PASEMI && PCI
2639 select PHYLIB 2639 select PHYLIB
2640 select INET_LRO 2640 select INET_LRO
2641 help 2641 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/forcedeth.c b/drivers/net/forcedeth.c
index 6f7e3fde9e7c..980c2c229a71 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 3c915b82e199..c082cf0b1ac6 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -84,7 +84,7 @@
84#include "s2io.h" 84#include "s2io.h"
85#include "s2io-regs.h" 85#include "s2io-regs.h"
86 86
87#define DRV_VERSION "2.0.26.15-2" 87#define DRV_VERSION "2.0.26.20"
88 88
89/* S2io Driver name & version. */ 89/* S2io Driver name & version. */
90static char s2io_driver_name[] = "Neterion"; 90static 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 0343b00cf1fd..01660f68943a 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