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

Commit 7d7dee96 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  dca: disable dca on IOAT ver.3.0 multiple-IOH platforms
  netpoll: Disable IRQ around RCU dereference in netpoll_rx
  sctp: Do not reset the packet during sctp_packet_config().
  net/llc: storing negative error codes in unsigned short
  MAINTAINERS: move atlx discussions to netdev
  drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory
  drivers/net/eql.c: prevent reading uninitialized stack memory
  drivers/net/usb/hso.c: prevent reading uninitialized memory
  xfrm: dont assume rcu_read_lock in xfrm_output_one()
  r8169: Handle rxfifo errors on 8168 chips
  3c59x: Remove atomic context inside vortex_{set|get}_wol
  tcp: Prevent overzealous packetization by SWS logic.
  net: RPS needs to depend upon USE_GENERIC_SMP_HELPERS
  phylib: fix PAL state machine restart on resume
  net: use rcu_barrier() in rollback_registered_many
  bonding: correctly process non-linear skbs
  ipv4: enable getsockopt() for IP_NODEFRAG
  ipv4: force_igmp_version ignored when a IGMPv3 query received
  ppp: potential NULL dereference in ppp_mp_explode()
  net/llc: make opt unsigned in llc_ui_setsockopt()
  ...
parents f1c9c979 4e8cec26
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1135,7 +1135,7 @@ ATLX ETHERNET DRIVERS
M:	Jay Cliburn <jcliburn@gmail.com>
M:	Chris Snook <chris.snook@gmail.com>
M:	Jie Yang <jie.yang@atheros.com>
L:	atl1-devel@lists.sourceforge.net
L:	netdev@vger.kernel.org
W:	http://sourceforge.net/projects/atl1
W:	http://atl1.sourceforge.net
S:	Maintained
+79 −6
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ static DEFINE_SPINLOCK(dca_lock);

static LIST_HEAD(dca_domains);

static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);

static int dca_providers_blocked;

static struct pci_bus *dca_pci_rc_from_dev(struct device *dev)
{
	struct pci_dev *pdev = to_pci_dev(dev);
@@ -70,6 +74,60 @@ static void dca_free_domain(struct dca_domain *domain)
	kfree(domain);
}

static int dca_provider_ioat_ver_3_0(struct device *dev)
{
	struct pci_dev *pdev = to_pci_dev(dev);

	return ((pdev->vendor == PCI_VENDOR_ID_INTEL) &&
		((pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG0) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG1) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG2) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG3) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG4) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG5) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG6) ||
		(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG7)));
}

static void unregister_dca_providers(void)
{
	struct dca_provider *dca, *_dca;
	struct list_head unregistered_providers;
	struct dca_domain *domain;
	unsigned long flags;

	blocking_notifier_call_chain(&dca_provider_chain,
				     DCA_PROVIDER_REMOVE, NULL);

	INIT_LIST_HEAD(&unregistered_providers);

	spin_lock_irqsave(&dca_lock, flags);

	if (list_empty(&dca_domains)) {
		spin_unlock_irqrestore(&dca_lock, flags);
		return;
	}

	/* at this point only one domain in the list is expected */
	domain = list_first_entry(&dca_domains, struct dca_domain, node);
	if (!domain)
		return;

	list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
		list_del(&dca->node);
		list_add(&dca->node, &unregistered_providers);
	}

	dca_free_domain(domain);

	spin_unlock_irqrestore(&dca_lock, flags);

	list_for_each_entry_safe(dca, _dca, &unregistered_providers, node) {
		dca_sysfs_remove_provider(dca);
		list_del(&dca->node);
	}
}

static struct dca_domain *dca_find_domain(struct pci_bus *rc)
{
	struct dca_domain *domain;
@@ -90,10 +148,14 @@ static struct dca_domain *dca_get_domain(struct device *dev)
	domain = dca_find_domain(rc);

	if (!domain) {
		if (dca_provider_ioat_ver_3_0(dev) && !list_empty(&dca_domains)) {
			dca_providers_blocked = 1;
		} else {
			domain = dca_allocate_domain(rc);
			if (domain)
				list_add(&domain->node, &dca_domains);
		}
	}

	return domain;
}
@@ -293,8 +355,6 @@ void free_dca_provider(struct dca_provider *dca)
}
EXPORT_SYMBOL_GPL(free_dca_provider);

static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);

/**
 * register_dca_provider - register a dca provider
 * @dca - struct created by alloc_dca_provider()
@@ -306,6 +366,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev)
	unsigned long flags;
	struct dca_domain *domain;

	spin_lock_irqsave(&dca_lock, flags);
	if (dca_providers_blocked) {
		spin_unlock_irqrestore(&dca_lock, flags);
		return -ENODEV;
	}
	spin_unlock_irqrestore(&dca_lock, flags);

	err = dca_sysfs_add_provider(dca, dev);
	if (err)
		return err;
@@ -313,7 +380,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev)
	spin_lock_irqsave(&dca_lock, flags);
	domain = dca_get_domain(dev);
	if (!domain) {
		if (dca_providers_blocked) {
			spin_unlock_irqrestore(&dca_lock, flags);
			dca_sysfs_remove_provider(dca);
			unregister_dca_providers();
		} else {
			spin_unlock_irqrestore(&dca_lock, flags);
		}
		return -ENODEV;
	}
	list_add(&dca->node, &domain->dca_providers);
+3 −4
Original line number Diff line number Diff line
@@ -635,6 +635,9 @@ struct vortex_private {
		must_free_region:1,				/* Flag: if zero, Cardbus owns the I/O region */
		large_frames:1,			/* accept large frames */
		handling_irq:1;			/* private in_irq indicator */
	/* {get|set}_wol operations are already serialized by rtnl.
	 * no additional locking is required for the enable_wol and acpi_set_WOL()
	 */
	int drv_flags;
	u16 status_enable;
	u16 intr_enable;
@@ -2939,13 +2942,11 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
	struct vortex_private *vp = netdev_priv(dev);

	spin_lock_irq(&vp->lock);
	wol->supported = WAKE_MAGIC;

	wol->wolopts = 0;
	if (vp->enable_wol)
		wol->wolopts |= WAKE_MAGIC;
	spin_unlock_irq(&vp->lock);
}

static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
@@ -2954,13 +2955,11 @@ static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
	if (wol->wolopts & ~WAKE_MAGIC)
		return -EINVAL;

	spin_lock_irq(&vp->lock);
	if (wol->wolopts & WAKE_MAGIC)
		vp->enable_wol = 1;
	else
		vp->enable_wol = 0;
	acpi_set_WOL(dev);
	spin_unlock_irq(&vp->lock);

	return 0;
}
+3 −0
Original line number Diff line number Diff line
@@ -2466,6 +2466,9 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
	if (!(dev->flags & IFF_MASTER))
		goto out;

	if (!pskb_may_pull(skb, sizeof(struct lacpdu)))
		goto out;

	read_lock(&bond->lock);
	slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
					orig_dev);
+3 −0
Original line number Diff line number Diff line
@@ -362,6 +362,9 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct
		goto out;
	}

	if (!pskb_may_pull(skb, arp_hdr_len(bond_dev)))
		goto out;

	if (skb->len < sizeof(struct arp_pkt)) {
		pr_debug("Packet is too small to be an ARP\n");
		goto out;
Loading