diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /drivers | |
parent | c0f39322c335412339dec16ebfd2a05ceba5ebcf (diff) | |
parent | 802fb176d8c635ae42da31b80841c26e8c7338a0 (diff) | |
download | linux-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/s2io.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/firestream.c | 1 | ||||
-rw-r--r-- | drivers/atm/he.c | 3 | ||||
-rw-r--r-- | drivers/atm/idt77252.c | 6 | ||||
-rw-r--r-- | drivers/atm/iphase.c | 2 | ||||
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/bfin_mac.c | 2 | ||||
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 1 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 18 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 4 | ||||
-rw-r--r-- | drivers/net/s2io.c | 2 | ||||
-rw-r--r-- | drivers/net/tulip/eeprom.c | 6 | ||||
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 7 | ||||
-rw-r--r-- | drivers/net/usb/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/usb/dm9601.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/pegasus.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pcmcia.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 13 |
20 files changed, 57 insertions, 35 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 47c57a4294b7..98099f526d82 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -978,6 +978,7 @@ static int fs_open(struct atm_vcc *atm_vcc) /* Docs are vague about this atm_hdr field. By the way, the FS * chip makes odd errors if lower bits are set.... -- REW */ tc->atm_hdr = (vpi << 20) | (vci << 4); + tmc0 = 0; { int pcr = atm_pcr_goal (txtp); diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 2e3395b7e8c1..ffc4a5a41946 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -3000,8 +3000,7 @@ he_proc_read(struct atm_dev *dev, loff_t *pos, char *page) /* eeprom routines -- see 4.7 */ -u8 -read_prom_byte(struct he_dev *he_dev, int addr) +static u8 read_prom_byte(struct he_dev *he_dev, int addr) { u32 val = 0, tmp_read = 0; int i, j = 0; diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b967919fb7e2..28d77b5195de 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -2016,8 +2016,7 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam) return 0; } -int -idt77252_send(struct atm_vcc *vcc, struct sk_buff *skb) +static int idt77252_send(struct atm_vcc *vcc, struct sk_buff *skb) { return idt77252_send_skb(vcc, skb, 0); } @@ -3072,8 +3071,7 @@ idt77252_dev_open(struct idt77252_dev *card) return 0; } -void -idt77252_dev_close(struct atm_dev *dev) +static void idt77252_dev_close(struct atm_dev *dev) { struct idt77252_dev *card = dev->dev_data; u32 conf; diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index ef52452640e0..670c093ed25f 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -958,6 +958,7 @@ static void ia_suni_pm7345_init (IADEV *iadev) /***************************** IA_LIB END *****************************/ +#ifdef CONFIG_ATM_IA_DEBUG static int tcnter = 0; static void xdump( u_char* cp, int length, char* prefix ) { @@ -992,6 +993,7 @@ static void xdump( u_char* cp, int length, char* prefix ) } } /* close xdump(... */ +#endif /* CONFIG_ATM_IA_DEBUG */ static struct atm_dev *ia_boards = NULL; 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 config PASEMI_MAC tristate "PA Semi 1/10Gbit MAC" - depends on PPC64 && PCI + depends on PPC_PASEMI && PCI select PHYLIB select INET_LRO 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: static int bf537mac_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct bf537mac_local *lp = netdev_priv(dev); unsigned int data; current_tx_ptr->skb = skb; @@ -634,7 +633,6 @@ out: static void bf537mac_rx(struct net_device *dev) { struct sk_buff *skb, *new_skb; - struct bf537mac_local *lp = netdev_priv(dev); unsigned short len; /* 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, if (command[0] == '-') { dev = NULL; + original_mtu = 0; bond_for_each_slave(bond, slave, i) if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) { 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) struct ring_desc* start_tx; struct ring_desc* prev_tx; struct nv_skb_map* prev_tx_ctx; + unsigned long flags; /* add fragments to entries count */ for (i = 0; i < fragments; i++) { @@ -1863,10 +1864,10 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) empty_slots = nv_get_empty_tx_slots(np); if (unlikely(empty_slots <= entries)) { - spin_lock_irq(&np->lock); + spin_lock_irqsave(&np->lock, flags); netif_stop_queue(dev); np->tx_stop = 1; - spin_unlock_irq(&np->lock); + spin_unlock_irqrestore(&np->lock, flags); return NETDEV_TX_BUSY; } @@ -1929,13 +1930,13 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ? NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; - spin_lock_irq(&np->lock); + spin_lock_irqsave(&np->lock, flags); /* set tx flags */ start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); np->put_tx.orig = put_tx; - spin_unlock_irq(&np->lock); + spin_unlock_irqrestore(&np->lock, flags); dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n", dev->name, entries, tx_flags_extra); @@ -1971,6 +1972,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) struct ring_desc_ex* prev_tx; struct nv_skb_map* prev_tx_ctx; struct nv_skb_map* start_tx_ctx; + unsigned long flags; /* add fragments to entries count */ for (i = 0; i < fragments; i++) { @@ -1980,10 +1982,10 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) empty_slots = nv_get_empty_tx_slots(np); if (unlikely(empty_slots <= entries)) { - spin_lock_irq(&np->lock); + spin_lock_irqsave(&np->lock, flags); netif_stop_queue(dev); np->tx_stop = 1; - spin_unlock_irq(&np->lock); + spin_unlock_irqrestore(&np->lock, flags); return NETDEV_TX_BUSY; } @@ -2059,7 +2061,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) start_tx->txvlan = 0; } - spin_lock_irq(&np->lock); + spin_lock_irqsave(&np->lock, flags); if (np->tx_limit) { /* 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) start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); np->put_tx.ex = put_tx; - spin_unlock_irq(&np->lock); + spin_unlock_irqrestore(&np->lock, flags); dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n", 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) static inline u16 emac_tx_csum(struct emac_instance *dev, struct sk_buff *skb) { - if (emac_has_feature(dev, EMAC_FTR_HAS_TAH && - skb->ip_summed == CHECKSUM_PARTIAL)) { + if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) && + (skb->ip_summed == CHECKSUM_PARTIAL)) { ++dev->stats.tx_packets_csum; return EMAC_TX_CTRL_TAH_CSUM; } 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 @@ #include "s2io.h" #include "s2io-regs.h" -#define DRV_VERSION "2.0.26.19" +#define DRV_VERSION "2.0.26.20" /* S2io Driver name & version. */ static 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 void __iomem *ee_addr = tp->base_addr + CSR9; int read_cmd = location | (EE_READ_CMD << addr_len); + /* If location is past the end of what we can address, don't + * read some other location (ie truncate). Just return zero. + */ + if (location > (1 << addr_len) - 1) + return 0; + iowrite32(EE_ENB & ~EE_CS, ee_addr); iowrite32(EE_ENB, ee_addr); 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, EEPROM. */ ee_data = tp->eeprom; + memset(ee_data, 0, sizeof(tp->eeprom)); sum = 0; if (chip_idx == LC82C168) { for (i = 0; i < 3; i++) { @@ -1458,8 +1459,12 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, /* A serial EEPROM interface, we read now and sort it out later. */ int sa_offset = 0; int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6; + int ee_max_addr = ((1 << ee_addr_size) - 1) * sizeof(u16); - for (i = 0; i < sizeof(tp->eeprom); i+=2) { + if (ee_max_addr > sizeof(tp->eeprom)) + ee_max_addr = sizeof(tp->eeprom); + + for (i = 0; i < ee_max_addr ; i += sizeof(u16)) { u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size); ee_data[i] = data & 0xff; 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 config USB_NET_AX8817X tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" - depends on USB_USBNET && NET_ETHERNET + depends on USB_USBNET select CRC32 default y 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) struct dev_mc_list *mc_list = net->mc_list; int i; - for (i = 0; i < net->mc_count; i++) { + for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) { u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; hashes[crc >> 3] |= 1 << (crc & 0x7); } 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) { pegasus_t *pegasus; - if (in_atomic()) - return 0; - pegasus = netdev_priv(dev); mii_ethtool_gset(&pegasus->mii, ecmd); - return 0; } 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 { struct net_device_stats stats; /* some statistics */ }; -static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices); +static LIST_HEAD(lapbeth_devices); /* ------------------------------------------------------------------------ */ 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, } if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { + b43err(ring->dev->wl, "RX DMA buffer allocation failed\n"); dev_kfree_skb_any(skb); return -EIO; } @@ -829,8 +830,12 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, DMA_TO_DEVICE); if (b43_dma_mapping_error(ring, dma_test, - b43_txhdr_size(dev), 1)) + b43_txhdr_size(dev), 1)) { + + b43err(dev->wl, + "TXHDR DMA allocation failed\n"); goto err_kfree_txhdr_cache; + } } 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) dev->conf.ConfigBase = parse.config.base; dev->conf.Present = parse.config.rmask[0]; + dev->conf.Attributes = CONF_ENABLE_IRQ; + dev->conf.IntType = INT_MEMORY_AND_IO; dev->io.BasePort2 = 0; dev->io.NumPorts2 = 0; @@ -112,8 +114,8 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) if (res != CS_SUCCESS) goto err_disable; - dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FIRST_SHARED; - dev->irq.IRQInfo1 = IRQ_LEVEL_ID | IRQ_SHARE_ID; + dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; + dev->irq.IRQInfo1 = IRQ_LEVEL_ID; dev->irq.Handler = NULL; /* The handler is registered later. */ dev->irq.Instance = NULL; 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: /* Card has a command result for us */ if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { - spin_lock(&priv->driver_lock); ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len); - spin_unlock(&priv->driver_lock); if (ret < 0) lbs_pr_err("could not receive cmd from card\n"); } 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) exit: /* - * Set device mode to sleep for power management. + * Set device mode to sleep for power management, + * on some hardware this call seems to consistently fail. + * From the specifications it is hard to tell why it fails, + * and if this is a "bad thing". + * Overall it is safe to just ignore the failure and + * continue suspending. The only downside is that the + * device will not be in optimal power save mode, but with + * the radio and the other components already disabled the + * device is as good as disabled. */ retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP); if (retval) - return retval; + WARNING(rt2x00dev, "Device failed to enter sleep state, " + "continue suspending.\n"); return 0; } |