Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
  p54: fix race condition in memory management
  cfg80211: test before subtraction on unsigned
  iwlwifi: fix error flow in iwl*_pci_probe
  rt2x00 : more devices to rt73usb.c
  rt2x00 : more devices to rt2500usb.c
  bonding: Fix device passed into ->ndo_neigh_setup().
  vlan: Fix vlan-in-vlan crashes.
  net: Fix missing dev->neigh_setup in register_netdevice().
  tmspci: fix request_irq race
  pkt_sched: act_police: Fix a rate estimator test.
  tg3: Fix 5906 link problems
  SCTP: change sctp_ctl_sock_init() to try IPv4 if IPv6 fails
  IPv6: add "disable" module parameter support to ipv6.ko
  sungem: another error printed one too early
  aoe: error printed 1 too early
  net pcmcia: worklimit reaches -1
  net: more timeouts that reach -1
  net: fix tokenring license
  dm9601: new vendor/product IDs
  netlink: invert error code in netlink_set_err()
  ...
  • Loading branch information
Linus Torvalds committed Mar 9, 2009
2 parents 39a3478 + c035002 commit df0b4a5
Show file tree
Hide file tree
Showing 36 changed files with 286 additions and 172 deletions.
35 changes: 35 additions & 0 deletions Documentation/networking/ipv6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

Options for the ipv6 module are supplied as parameters at load time.

Module options may be given as command line arguments to the insmod
or modprobe command, but are usually specified in either the
/etc/modules.conf or /etc/modprobe.conf configuration file, or in a
distro-specific configuration file.

The available ipv6 module parameters are listed below. If a parameter
is not specified the default value is used.

The parameters are as follows:

disable

Specifies whether to load the IPv6 module, but disable all
its functionality. This might be used when another module
has a dependency on the IPv6 module being loaded, but no
IPv6 addresses or operations are desired.

The possible values and their effects are:

0
IPv6 is enabled.

This is the default value.

1
IPv6 is disabled.

No IPv6 addresses will be added to interfaces, and
it will not be possible to open an IPv6 socket.

A reboot is required to enable IPv6.

2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static inline void __init ldp_init_smc911x(void)
}

ldp_smc911x_resources[0].start = cs_mem_base + 0x0;
ldp_smc911x_resources[0].end = cs_mem_base + 0xf;
ldp_smc911x_resources[0].end = cs_mem_base + 0xff;
udelay(100);

eth_gpio = LDP_SMC911X_GPIO;
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/aoe/aoedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ skbfree(struct sk_buff *skb)
return;
while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0)
msleep(Sms);
if (i <= 0) {
if (i < 0) {
printk(KERN_ERR
"aoe: %s holds ref: %s\n",
skb->dev ? skb->dev->name : "netif",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arm/ks8695net.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ ks8695_reset(struct ks8695_priv *ksp)
msleep(1);
}

if (reset_timeout == 0) {
if (reset_timeout < 0) {
dev_crit(ksp->dev,
"Timeout waiting for DMA engines to reset\n");
/* And blithely carry on */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4113,7 +4113,7 @@ static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms)
const struct net_device_ops *slave_ops
= slave->dev->netdev_ops;
if (slave_ops->ndo_neigh_setup)
return slave_ops->ndo_neigh_setup(dev, parms);
return slave_ops->ndo_neigh_setup(slave->dev, parms);
}
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,13 +957,14 @@ jme_process_receive(struct jme_adapter *jme, int limit)
goto out_inc;

i = atomic_read(&rxring->next_to_clean);
while (limit-- > 0) {
while (limit > 0) {
rxdesc = rxring->desc;
rxdesc += i;

if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
!(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
goto out;
--limit;

desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT;

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/pcmcia/3c574_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,8 @@ static int el3_rx(struct net_device *dev, int worklimit)
DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus));
while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) &&
(--worklimit >= 0)) {
worklimit > 0) {
worklimit--;
if (rx_status & 0x4000) { /* Error, update stats. */
short error = rx_status & 0x3800;
dev->stats.rx_errors++;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/pcmcia/3c589_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ static int el3_rx(struct net_device *dev)
DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS));
while (!((rx_status = inw(ioaddr + RX_STATUS)) & 0x8000) &&
(--worklimit >= 0)) {
worklimit > 0) {
worklimit--;
if (rx_status & 0x4000) { /* Error, update stats. */
short error = rx_status & 0x3800;
dev->stats.rx_errors++;
Expand Down
12 changes: 12 additions & 0 deletions drivers/net/smc911x.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
#define SMC_USE_16BIT 0
#define SMC_USE_32BIT 1
#define SMC_IRQ_SENSE IRQF_TRIGGER_LOW
#elif defined(CONFIG_ARCH_OMAP34XX)
#define SMC_USE_16BIT 0
#define SMC_USE_32BIT 1
#define SMC_IRQ_SENSE IRQF_TRIGGER_LOW
#define SMC_MEM_RESERVED 1
#elif defined(CONFIG_ARCH_OMAP24XX)
#define SMC_USE_16BIT 0
#define SMC_USE_32BIT 1
#define SMC_IRQ_SENSE IRQF_TRIGGER_LOW
#define SMC_MEM_RESERVED 1
#else
/*
* Default configuration
Expand Down Expand Up @@ -675,6 +685,7 @@ smc_pxa_dma_outsl(struct smc911x_local *lp, u_long physaddr,
#define CHIP_9116 0x0116
#define CHIP_9117 0x0117
#define CHIP_9118 0x0118
#define CHIP_9211 0x9211
#define CHIP_9215 0x115A
#define CHIP_9217 0x117A
#define CHIP_9218 0x118A
Expand All @@ -689,6 +700,7 @@ static const struct chip_id chip_ids[] = {
{ CHIP_9116, "LAN9116" },
{ CHIP_9117, "LAN9117" },
{ CHIP_9118, "LAN9118" },
{ CHIP_9211, "LAN9211" },
{ CHIP_9215, "LAN9215" },
{ CHIP_9217, "LAN9217" },
{ CHIP_9218, "LAN9218" },
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ static void gem_reset(struct gem *gp)
break;
} while (val & (GREG_SWRST_TXRST | GREG_SWRST_RXRST));

if (limit <= 0)
if (limit < 0)
printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name);

if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes)
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,8 @@ static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable)
{
u32 reg;

if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
return;

reg = MII_TG3_MISC_SHDW_WREN |
Expand Down
18 changes: 9 additions & 9 deletions drivers/net/tokenring/tmspci.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
goto err_out_trdev;
}

ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
dev->name, dev);
if (ret)
goto err_out_region;

dev->base_addr = pci_ioaddr;
dev->irq = pci_irq_line;
dev->dma = 0;
Expand All @@ -142,7 +137,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
ret = tmsdev_init(dev, &pdev->dev);
if (ret) {
printk("%s: unable to get memory for dev->priv.\n", dev->name);
goto err_out_irq;
goto err_out_region;
}

tp = netdev_priv(dev);
Expand All @@ -157,22 +152,27 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic

tp->tmspriv = cardinfo;

ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
dev->name, dev);
if (ret)
goto err_out_tmsdev;

dev->open = tms380tr_open;
dev->stop = tms380tr_close;
pci_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);

ret = register_netdev(dev);
if (ret)
goto err_out_tmsdev;
goto err_out_irq;

return 0;

err_out_irq:
free_irq(pdev->irq, dev);
err_out_tmsdev:
pci_set_drvdata(pdev, NULL);
tmsdev_term(dev);
err_out_irq:
free_irq(pdev->irq, dev);
err_out_region:
release_region(pci_ioaddr, TMS_PCI_IO_EXTENT);
err_out_trdev:
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ucc_geth_mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
static int uec_mdio_reset(struct mii_bus *bus)
{
struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv;
unsigned int timeout = PHY_INIT_TIMEOUT;
int timeout = PHY_INIT_TIMEOUT;

mutex_lock(&bus->mdio_lock);

Expand All @@ -123,7 +123,7 @@ static int uec_mdio_reset(struct mii_bus *bus)

mutex_unlock(&bus->mdio_lock);

if (timeout <= 0) {
if (timeout < 0) {
printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name);
return -EBUSY;
}
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/usb/dm9601.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,10 @@ static const struct usb_device_id products[] = {
},
{
USB_DEVICE(0x0a47, 0x9601), /* Hirose USB-100 */
.driver_info = (unsigned long)&dm9601_info,
},
{
USB_DEVICE(0x0fe6, 0x8101), /* DM9601 USB to Fast Ethernet Adapter */
.driver_info = (unsigned long)&dm9601_info,
},
{}, // END
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3868,7 +3868,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
err = iwl_eeprom_check_version(priv);
if (err)
goto out_iounmap;
goto out_free_eeprom;

/* extract MAC Address */
iwl_eeprom_get_mac(priv, priv->mac_addr);
Expand Down Expand Up @@ -3945,6 +3945,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0;

out_remove_sysfs:
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group);
out_uninit_drv:
iwl_uninit_drv(priv);
Expand All @@ -3953,8 +3955,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_iounmap:
pci_iounmap(pdev, priv->hw_base);
out_pci_release_regions:
pci_release_regions(pdev);
pci_set_drvdata(pdev, NULL);
pci_release_regions(pdev);
out_pci_disable_device:
pci_disable_device(pdev);
out_ieee80211_free_hw:
Expand Down
17 changes: 7 additions & 10 deletions drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -7911,7 +7911,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
if (err < 0) {
IWL_DEBUG_INFO("Failed to init the card\n");
goto out_remove_sysfs;
goto out_iounmap;
}

/***********************
Expand All @@ -7921,7 +7921,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
err = iwl3945_eeprom_init(priv);
if (err) {
IWL_ERROR("Unable to init EEPROM\n");
goto out_remove_sysfs;
goto out_iounmap;
}
/* MAC Address location in EEPROM same for 3945/4965 */
get_eeprom_mac(priv, priv->mac_addr);
Expand Down Expand Up @@ -7975,7 +7975,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
err = iwl3945_init_channel_map(priv);
if (err) {
IWL_ERROR("initializing regulatory failed: %d\n", err);
goto out_release_irq;
goto out_unset_hw_setting;
}

err = iwl3945_init_geos(priv);
Expand Down Expand Up @@ -8045,25 +8045,22 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
return 0;

out_remove_sysfs:
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
out_free_geos:
iwl3945_free_geos(priv);
out_free_channel_map:
iwl3945_free_channel_map(priv);


out_release_irq:
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
out_unset_hw_setting:
iwl3945_unset_hw_setting(priv);

out_iounmap:
pci_iounmap(pdev, priv->hw_base);
out_pci_release_regions:
pci_release_regions(pdev);
out_pci_disable_device:
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);
out_ieee80211_free_hw:
ieee80211_free_hw(priv->hw);
out:
Expand Down
9 changes: 6 additions & 3 deletions drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,11 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev,
__le32 req_id)
{
struct p54_common *priv = dev->priv;
struct sk_buff *entry = priv->tx_queue.next;
struct sk_buff *entry;
unsigned long flags;

spin_lock_irqsave(&priv->tx_queue.lock, flags);
entry = priv->tx_queue.next;
while (entry != (struct sk_buff *)&priv->tx_queue) {
struct p54_hdr *hdr = (struct p54_hdr *) entry->data;

Expand All @@ -732,7 +733,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
struct p54_common *priv = dev->priv;
struct p54_hdr *hdr = (struct p54_hdr *) skb->data;
struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data;
struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next;
struct sk_buff *entry;
u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom;
struct memrecord *range = NULL;
u32 freed = 0;
Expand All @@ -741,6 +742,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
int count, idx;

spin_lock_irqsave(&priv->tx_queue.lock, flags);
entry = (struct sk_buff *) priv->tx_queue.next;
while (entry != (struct sk_buff *)&priv->tx_queue) {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
struct p54_hdr *entry_hdr;
Expand Down Expand Up @@ -976,7 +978,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
struct p54_hdr *data, u32 len)
{
struct p54_common *priv = dev->priv;
struct sk_buff *entry = priv->tx_queue.next;
struct sk_buff *entry;
struct sk_buff *target_skb = NULL;
struct ieee80211_tx_info *info;
struct memrecord *range;
Expand Down Expand Up @@ -1014,6 +1016,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
}
}

entry = priv->tx_queue.next;
while (left--) {
u32 hole_size;
info = IEEE80211_SKB_CB(entry);
Expand Down
Loading

0 comments on commit df0b4a5

Please sign in to comment.