Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ad20802 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
  bonding: fix panic if initialization fails
  IXP4xx: complete Ethernet netdev setup before calling register_netdev().
  IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
  ipvs: Fix IPv4 FWMARK virtual services
  ipv4: Make INET_LRO a bool instead of tristate.
  net: remove stale reference to fastroute from Kconfig help text
  net: update skb_recycle_check() for hardware timestamping changes
  bnx2: Fix panic in bnx2_poll_work().
  net-sched: fix bfifo default limit
  igb: resolve panic on shutdown when SR-IOV is enabled
  wimax: oops: wimax_dev_add() is the only one that can initialize the state
  wimax: fix oops if netlink fails to add attribute
  Bluetooth: Move dev_set_name() to a context that can sleep
  netfilter: ctnetlink: fix wrong message type in user updates
  netfilter: xt_cluster: fix use of cluster match with 32 nodes
  netfilter: ip6t_ipv6header: fix match on packets ending with NEXTHDR_NONE
  netfilter: add missing linux/types.h include to xt_LED.h
  mac80211: pid, fix memory corruption
  mac80211: minstrel, fix memory corruption
  cfg80211: fix comment on regulatory hint processing
  ...
parents 091bf762 e1cc1c57
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -714,7 +714,7 @@ static int __init npe_init_module(void)
	}
	}


	if (!found)
	if (!found)
		return -ENOSYS;
		return -ENODEV;
	return 0;
	return 0;
}
}


+16 −15
Original line number Original line Diff line number Diff line
@@ -338,12 +338,12 @@ static int ixp4xx_mdio_register(void)
	if (cpu_is_ixp43x()) {
	if (cpu_is_ixp43x()) {
		/* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
		/* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
		if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEC_ETH))
		if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEC_ETH))
			return -ENOSYS;
			return -ENODEV;
		mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
		mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
	} else {
	} else {
		/* All MII PHY accesses use NPE-B Ethernet registers */
		/* All MII PHY accesses use NPE-B Ethernet registers */
		if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
		if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
			return -ENOSYS;
			return -ENODEV;
		mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
		mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
	}
	}


@@ -1174,7 +1174,7 @@ static int __devinit eth_init_one(struct platform_device *pdev)
		regs_phys  = IXP4XX_EthC_BASE_PHYS;
		regs_phys  = IXP4XX_EthC_BASE_PHYS;
		break;
		break;
	default:
	default:
		err = -ENOSYS;
		err = -ENODEV;
		goto err_free;
		goto err_free;
	}
	}


@@ -1189,15 +1189,10 @@ static int __devinit eth_init_one(struct platform_device *pdev)
		goto err_free;
		goto err_free;
	}
	}


	if (register_netdev(dev)) {
		err = -EIO;
		goto err_npe_rel;
	}

	port->mem_res = request_mem_region(regs_phys, REGS_SIZE, dev->name);
	port->mem_res = request_mem_region(regs_phys, REGS_SIZE, dev->name);
	if (!port->mem_res) {
	if (!port->mem_res) {
		err = -EBUSY;
		err = -EBUSY;
		goto err_unreg;
		goto err_npe_rel;
	}
	}


	port->plat = plat;
	port->plat = plat;
@@ -1215,20 +1210,25 @@ static int __devinit eth_init_one(struct platform_device *pdev)
	snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, "0", plat->phy);
	snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, "0", plat->phy);
	port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0,
	port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0,
				   PHY_INTERFACE_MODE_MII);
				   PHY_INTERFACE_MODE_MII);
	if (IS_ERR(port->phydev)) {
	if ((err = IS_ERR(port->phydev)))
		printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
		goto err_free_mem;
		return PTR_ERR(port->phydev);
	}


	port->phydev->irq = PHY_POLL;
	port->phydev->irq = PHY_POLL;


	if ((err = register_netdev(dev)))
		goto err_phy_dis;

	printk(KERN_INFO "%s: MII PHY %i on %s\n", dev->name, plat->phy,
	printk(KERN_INFO "%s: MII PHY %i on %s\n", dev->name, plat->phy,
	       npe_name(port->npe));
	       npe_name(port->npe));


	return 0;
	return 0;


err_unreg:
err_phy_dis:
	unregister_netdev(dev);
	phy_disconnect(port->phydev);
err_free_mem:
	npe_port_tab[NPE_ID(port->id)] = NULL;
	platform_set_drvdata(pdev, NULL);
	release_resource(port->mem_res);
err_npe_rel:
err_npe_rel:
	npe_release(port->npe);
	npe_release(port->npe);
err_free:
err_free:
@@ -1242,6 +1242,7 @@ static int __devexit eth_remove_one(struct platform_device *pdev)
	struct port *port = netdev_priv(dev);
	struct port *port = netdev_priv(dev);


	unregister_netdev(dev);
	unregister_netdev(dev);
	phy_disconnect(port->phydev);
	npe_port_tab[NPE_ID(port->id)] = NULL;
	npe_port_tab[NPE_ID(port->id)] = NULL;
	platform_set_drvdata(pdev, NULL);
	platform_set_drvdata(pdev, NULL);
	npe_release(port->npe);
	npe_release(port->npe);
+4 −2
Original line number Original line Diff line number Diff line
@@ -54,8 +54,8 @@


#define DRV_MODULE_NAME		"bnx2"
#define DRV_MODULE_NAME		"bnx2"
#define PFX DRV_MODULE_NAME	": "
#define PFX DRV_MODULE_NAME	": "
#define DRV_MODULE_VERSION	"2.0.0"
#define DRV_MODULE_VERSION	"2.0.1"
#define DRV_MODULE_RELDATE	"April 2, 2009"
#define DRV_MODULE_RELDATE	"May 6, 2009"
#define FW_MIPS_FILE_06		"bnx2/bnx2-mips-06-4.6.16.fw"
#define FW_MIPS_FILE_06		"bnx2/bnx2-mips-06-4.6.16.fw"
#define FW_RV2P_FILE_06		"bnx2/bnx2-rv2p-06-4.6.16.fw"
#define FW_RV2P_FILE_06		"bnx2/bnx2-rv2p-06-4.6.16.fw"
#define FW_MIPS_FILE_09		"bnx2/bnx2-mips-09-4.6.17.fw"
#define FW_MIPS_FILE_09		"bnx2/bnx2-mips-09-4.6.17.fw"
@@ -2600,6 +2600,7 @@ bnx2_get_hw_tx_cons(struct bnx2_napi *bnapi)
	/* Tell compiler that status block fields can change. */
	/* Tell compiler that status block fields can change. */
	barrier();
	barrier();
	cons = *bnapi->hw_tx_cons_ptr;
	cons = *bnapi->hw_tx_cons_ptr;
	barrier();
	if (unlikely((cons & MAX_TX_DESC_CNT) == MAX_TX_DESC_CNT))
	if (unlikely((cons & MAX_TX_DESC_CNT) == MAX_TX_DESC_CNT))
		cons++;
		cons++;
	return cons;
	return cons;
@@ -2879,6 +2880,7 @@ bnx2_get_hw_rx_cons(struct bnx2_napi *bnapi)
	/* Tell compiler that status block fields can change. */
	/* Tell compiler that status block fields can change. */
	barrier();
	barrier();
	cons = *bnapi->hw_rx_cons_ptr;
	cons = *bnapi->hw_rx_cons_ptr;
	barrier();
	if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT))
	if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT))
		cons++;
		cons++;
	return cons;
	return cons;
+0 −8
Original line number Original line Diff line number Diff line
@@ -5181,7 +5181,6 @@ static int __init bonding_init(void)
{
{
	int i;
	int i;
	int res;
	int res;
	struct bonding *bond;


	printk(KERN_INFO "%s", version);
	printk(KERN_INFO "%s", version);


@@ -5212,13 +5211,6 @@ static int __init bonding_init(void)


	goto out;
	goto out;
err:
err:
	list_for_each_entry(bond, &bond_dev_list, bond_list) {
		bond_work_cancel_all(bond);
		destroy_workqueue(bond->wq);
	}

	bond_destroy_sysfs();

	rtnl_lock();
	rtnl_lock();
	bond_free_all();
	bond_free_all();
	rtnl_unlock();
	rtnl_unlock();
+5 −7
Original line number Original line Diff line number Diff line
@@ -2006,7 +2006,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
	u32 rctl;
	u32 rctl;
	u32 srrctl = 0;
	u32 srrctl = 0;
	int i, j;
	int i;


	rctl = rd32(E1000_RCTL);
	rctl = rd32(E1000_RCTL);


@@ -2071,8 +2071,6 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
	if (adapter->vfs_allocated_count) {
	if (adapter->vfs_allocated_count) {
		u32 vmolr;
		u32 vmolr;


		j = adapter->rx_ring[0].reg_idx;

		/* set all queue drop enable bits */
		/* set all queue drop enable bits */
		wr32(E1000_QDE, ALL_QUEUES);
		wr32(E1000_QDE, ALL_QUEUES);
		srrctl |= E1000_SRRCTL_DROP_EN;
		srrctl |= E1000_SRRCTL_DROP_EN;
@@ -2080,16 +2078,16 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
		/* disable queue 0 to prevent tail write w/o re-config */
		/* disable queue 0 to prevent tail write w/o re-config */
		wr32(E1000_RXDCTL(0), 0);
		wr32(E1000_RXDCTL(0), 0);


		vmolr = rd32(E1000_VMOLR(j));
		vmolr = rd32(E1000_VMOLR(adapter->vfs_allocated_count));
		if (rctl & E1000_RCTL_LPE)
		if (rctl & E1000_RCTL_LPE)
			vmolr |= E1000_VMOLR_LPE;
			vmolr |= E1000_VMOLR_LPE;
		if (adapter->num_rx_queues > 0)
		if (adapter->num_rx_queues > 1)
			vmolr |= E1000_VMOLR_RSSE;
			vmolr |= E1000_VMOLR_RSSE;
		wr32(E1000_VMOLR(j), vmolr);
		wr32(E1000_VMOLR(adapter->vfs_allocated_count), vmolr);
	}
	}


	for (i = 0; i < adapter->num_rx_queues; i++) {
	for (i = 0; i < adapter->num_rx_queues; i++) {
		j = adapter->rx_ring[i].reg_idx;
		int j = adapter->rx_ring[i].reg_idx;
		wr32(E1000_SRRCTL(j), srrctl);
		wr32(E1000_SRRCTL(j), srrctl);
	}
	}


Loading