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

Commit 49d8137a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:

 1) We've discovered a common error in several networking drivers, they
    put VLAN offload features into ->vlan_features, which would suggest
    that they support offloading 2 or more levels of VLAN encapsulation.
    Not only do these devices not do that, but we don't have the
    infrastructure yet to handle that at all.

    Fixes from Vlad Yasevich.

 2) Fix tcpdump crash with bridging and vlans, also from Vlad.

 3) Some MAINTAINERS updates for random32 and bonding.

 4) Fix late reseeds of prandom generator, from Sasha Levin.

 5) Bridge doesn't handle stacked vlans properly, fix from Toshiaki
    Makita.

 6) Fix deadlock in openvswitch, from Flavio Leitner.

 7) get_timewait4_sock() doesn't report delay times correctly, fix from
    Eric Dumazet.

 8) Duplicate address detection and addrconf verification need to run in
    contexts where RTNL can be obtained.  Move them to run from a
    workqueue.  From Hannes Frederic Sowa.

 9) Fix route refcount leaking in ip tunnels, from Pravin B Shelar.

10) Don't return -EINTR from non-blocking recvmsg() on AF_UNIX sockets,
    from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (28 commits)
  vlan: Warn the user if lowerdev has bad vlan features.
  veth: Turn off vlan rx acceleration in vlan_features
  ifb: Remove vlan acceleration from vlan_features
  qlge: Do not propaged vlan tag offloads to vlans
  bridge: Fix crash with vlan filtering and tcpdump
  net: Account for all vlan headers in skb_mac_gso_segment
  MAINTAINERS: bonding: change email address
  MAINTAINERS: bonding: change email address
  ipv6: move DAD and addrconf_verify processing to workqueue
  tcp: fix get_timewait4_sock() delay computation on 64bit
  openvswitch: fix a possible deadlock and lockdep warning
  bridge: Fix handling stacked vlan tags
  bridge: Fix inabillity to retrieve vlan tags when tx offload is disabled
  vhost: validate vhost_get_vq_desc return value
  vhost: fix total length when packets are too short
  random32: avoid attempt to late reseed if in the middle of seeding
  random32: assign to network folks in MAINTAINERS
  net/mlx4_core: pass pci_device_id.driver_data to __mlx4_init_one during reset
  core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
  vlan: Set hard_header_len according to available acceleration
  ...
parents bc53267e 5f2feca2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1832,8 +1832,8 @@ F: net/bluetooth/
F:	include/net/bluetooth/

BONDING DRIVER
M:	Jay Vosburgh <fubar@us.ibm.com>
M:	Veaceslav Falico <vfalico@redhat.com>
M:	Jay Vosburgh <j.vosburgh@gmail.com>
M:	Veaceslav Falico <vfalico@gmail.com>
M:	Andy Gospodarek <andy@greyhouse.net>
L:	netdev@vger.kernel.org
W:	http://sourceforge.net/projects/bonding/
@@ -6006,6 +6006,7 @@ F: include/uapi/linux/net.h
F:	include/uapi/linux/netdevice.h
F:	tools/net/
F:	tools/testing/selftests/net/
F:	lib/random32.c

NETWORKING [IPv4/IPv6]
M:	"David S. Miller" <davem@davemloft.net>
+2 −3
Original line number Diff line number Diff line
@@ -17649,8 +17649,6 @@ static int tg3_init_one(struct pci_dev *pdev,

	tg3_init_bufmgr_config(tp);

	features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;

	/* 5700 B0 chips do not support checksumming correctly due
	 * to hardware bugs.
	 */
@@ -17682,7 +17680,8 @@ static int tg3_init_one(struct pci_dev *pdev,
			features |= NETIF_F_TSO_ECN;
	}

	dev->features |= features;
	dev->features |= features | NETIF_F_HW_VLAN_CTAG_TX |
			 NETIF_F_HW_VLAN_CTAG_RX;
	dev->vlan_features |= features;

	/*
+20 −40
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/interrupt.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_mdio.h>
@@ -88,8 +89,9 @@
#define      MVNETA_TX_IN_PRGRS                  BIT(1)
#define      MVNETA_TX_FIFO_EMPTY                BIT(8)
#define MVNETA_RX_MIN_FRAME_SIZE                 0x247c
#define MVNETA_SGMII_SERDES_CFG			 0x24A0
#define MVNETA_SERDES_CFG			 0x24A0
#define      MVNETA_SGMII_SERDES_PROTO		 0x0cc7
#define      MVNETA_RGMII_SERDES_PROTO		 0x0667
#define MVNETA_TYPE_PRIO                         0x24bc
#define      MVNETA_FORCE_UNI                    BIT(21)
#define MVNETA_TXQ_CMD_1                         0x24e4
@@ -161,7 +163,7 @@
#define      MVNETA_GMAC_MAX_RX_SIZE_MASK        0x7ffc
#define      MVNETA_GMAC0_PORT_ENABLE            BIT(0)
#define MVNETA_GMAC_CTRL_2                       0x2c08
#define      MVNETA_GMAC2_PSC_ENABLE             BIT(3)
#define      MVNETA_GMAC2_PCS_ENABLE             BIT(3)
#define      MVNETA_GMAC2_PORT_RGMII             BIT(4)
#define      MVNETA_GMAC2_PORT_RESET             BIT(6)
#define MVNETA_GMAC_STATUS                       0x2c10
@@ -710,35 +712,6 @@ static void mvneta_rxq_bm_disable(struct mvneta_port *pp,
	mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val);
}



/* Sets the RGMII Enable bit (RGMIIEn) in port MAC control register */
static void mvneta_gmac_rgmii_set(struct mvneta_port *pp, int enable)
{
	u32  val;

	val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);

	if (enable)
		val |= MVNETA_GMAC2_PORT_RGMII;
	else
		val &= ~MVNETA_GMAC2_PORT_RGMII;

	mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);
}

/* Config SGMII port */
static void mvneta_port_sgmii_config(struct mvneta_port *pp)
{
	u32 val;

	val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
	val |= MVNETA_GMAC2_PSC_ENABLE;
	mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);

	mvreg_write(pp, MVNETA_SGMII_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO);
}

/* Start the Ethernet port RX and TX activity */
static void mvneta_port_up(struct mvneta_port *pp)
{
@@ -2756,12 +2729,15 @@ static void mvneta_port_power_up(struct mvneta_port *pp, int phy_mode)
	mvreg_write(pp, MVNETA_UNIT_INTR_CAUSE, 0);

	if (phy_mode == PHY_INTERFACE_MODE_SGMII)
		mvneta_port_sgmii_config(pp);
		mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO);
	else
		mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_RGMII_SERDES_PROTO);

	val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);

	mvneta_gmac_rgmii_set(pp, 1);
	val |= MVNETA_GMAC2_PCS_ENABLE | MVNETA_GMAC2_PORT_RGMII;

	/* Cancel Port Reset */
	val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
	val &= ~MVNETA_GMAC2_PORT_RESET;
	mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);

@@ -2774,6 +2750,7 @@ static void mvneta_port_power_up(struct mvneta_port *pp, int phy_mode)
static int mvneta_probe(struct platform_device *pdev)
{
	const struct mbus_dram_target_info *dram_target_info;
	struct resource *res;
	struct device_node *dn = pdev->dev.of_node;
	struct device_node *phy_node;
	u32 phy_addr;
@@ -2838,9 +2815,15 @@ static int mvneta_probe(struct platform_device *pdev)

	clk_prepare_enable(pp->clk);

	pp->base = of_iomap(dn, 0);
	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		err = -ENODEV;
		goto err_clk;
	}

	pp->base = devm_ioremap_resource(&pdev->dev, res);
	if (pp->base == NULL) {
		err = -ENOMEM;
		err = PTR_ERR(pp->base);
		goto err_clk;
	}

@@ -2848,7 +2831,7 @@ static int mvneta_probe(struct platform_device *pdev)
	pp->stats = alloc_percpu(struct mvneta_pcpu_stats);
	if (!pp->stats) {
		err = -ENOMEM;
		goto err_unmap;
		goto err_clk;
	}

	for_each_possible_cpu(cpu) {
@@ -2913,8 +2896,6 @@ static int mvneta_probe(struct platform_device *pdev)
	mvneta_deinit(pp);
err_free_stats:
	free_percpu(pp->stats);
err_unmap:
	iounmap(pp->base);
err_clk:
	clk_disable_unprepare(pp->clk);
err_free_irq:
@@ -2934,7 +2915,6 @@ static int mvneta_remove(struct platform_device *pdev)
	mvneta_deinit(pp);
	clk_disable_unprepare(pp->clk);
	free_percpu(pp->stats);
	iounmap(pp->base);
	irq_dispose_mapping(dev->irq);
	free_netdev(dev);

+5 −1
Original line number Diff line number Diff line
@@ -2681,7 +2681,11 @@ static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,

static pci_ers_result_t mlx4_pci_slot_reset(struct pci_dev *pdev)
{
	int ret = __mlx4_init_one(pdev, 0);
	const struct pci_device_id *id;
	int ret;

	id = pci_match_id(mlx4_pci_table, pdev);
	ret = __mlx4_init_one(pdev, id->driver_data);

	return ret ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
}
+3 −1
Original line number Diff line number Diff line
@@ -4765,7 +4765,9 @@ static int qlge_probe(struct pci_dev *pdev,
	ndev->features = ndev->hw_features;
	ndev->vlan_features = ndev->hw_features;
	/* vlan gets same features (except vlan filter) */
	ndev->vlan_features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
	ndev->vlan_features &= ~(NETIF_F_HW_VLAN_CTAG_FILTER |
				 NETIF_F_HW_VLAN_CTAG_TX |
				 NETIF_F_HW_VLAN_CTAG_RX);

	if (test_bit(QL_DMA64, &qdev->flags))
		ndev->features |= NETIF_F_HIGHDMA;
Loading