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

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

 1) nfnetlink timestamp taken from wrong skb, fix from Florian Westphal.

 2) Revert some msleep conversions in rtlwifi as these spots are in
    atomic context, from Larry Finger.

 3) Validate that NFTA_SET_TABLE attribute is actually specified when we
    call nf_tables_getset().  From Phil Turnbull.

 4) Don't do mdio_reset in stmmac driver with spinlock held as that can
    sleep, from Vincent Palatin.

 5) sk_filter() does things other than run a BPF filter, so we should
    not elide it's call just because sk->sk_filter is NULL.  Fix from
    Eric Dumazet.

 6) Fix missing backlog updates in several packet schedulers, from Cong
    Wang.

 7) bnx2x driver should allow VLAN add/remove while the interface is
    down, from Michal Schmidt.

 8) Several RDS/TCP race fixes from Sowmini Varadhan.

 9) fq_codel scheduler doesn't return correct queue length in dumps,
    from Eric Dumazet.

10) Fix TCP stats for tail loss probe and early retransmit in ipv6, from
    Yuchung Cheng.

11) Properly initialize udp_tunnel_socket_cfg in l2tp_tunnel_create(),
    from Guillaume Nault.

12) qfq scheduler leaks SKBs if a kzalloc fails, fix from Florian
    Westphal.

13) sock_fprog passed into PACKET_FANOUT_DATA needs compat handling,
    from Willem de Bruijn.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
  vmxnet3: segCnt can be 1 for LRO packets
  packet: compat support for sock_fprog
  stmmac: fix parameter to dwmac4_set_umac_addr()
  net/mlx5e: Fix blue flame quota logic
  net/mlx5e: Use ndo_stop explicitly at shutdown flow
  net/mlx5: E-Switch, always set mc_promisc for allmulti vports
  net/mlx5: E-Switch, Modify node guid on vf set MAC
  net/mlx5: E-Switch, Fix vport enable flow
  net/mlx5: E-Switch, Use the correct error check on returned pointers
  net/mlx5: E-Switch, Use the correct free() function
  net/mlx5: Fix E-Switch flow steering capabilities check
  net/mlx5: Fix flow steering NIC capabilities check
  net/mlx5: Fix root flow table update
  net/mlx5: Fix MLX5_CMD_OP_MAX to be defined correctly
  net/mlx5: Fix masking of reserved bits in XRCD number
  net/mlx5: Fix the size of modify QP mailbox
  mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name()
  mlxsw: spectrum: Make split flow match firmware requirements
  wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
  cfg80211: remove get/set antenna and tx power warnings
  ...
parents 729d3784 50219538
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8009,6 +8009,7 @@ Q: http://patchwork.kernel.org/project/linux-wireless/list/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
S:	Maintained
F:	Documentation/devicetree/bindings/net/wireless/
F:	drivers/net/wireless/

NETXEN (1/10) GbE SUPPORT
+62 −89
Original line number Diff line number Diff line
@@ -12895,146 +12895,119 @@ static int __bnx2x_vlan_configure_vid(struct bnx2x *bp, u16 vid, bool add)
	return rc;
}

int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp)
static int bnx2x_vlan_configure_vid_list(struct bnx2x *bp)
{
	struct bnx2x_vlan_entry *vlan;
	int rc = 0;

	if (!bp->vlan_cnt) {
		DP(NETIF_MSG_IFUP, "No need to re-configure vlan filters\n");
		return 0;
	}

	/* Configure all non-configured entries */
	list_for_each_entry(vlan, &bp->vlan_reg, link) {
		/* Prepare for cleanup in case of errors */
		if (rc) {
			vlan->hw = false;
			continue;
		}

		if (!vlan->hw)
		if (vlan->hw)
			continue;

		DP(NETIF_MSG_IFUP, "Re-configuring vlan 0x%04x\n", vlan->vid);
		if (bp->vlan_cnt >= bp->vlan_credit)
			return -ENOBUFS;

		rc = __bnx2x_vlan_configure_vid(bp, vlan->vid, true);
		if (rc) {
			BNX2X_ERR("Unable to configure VLAN %d\n", vlan->vid);
			vlan->hw = false;
			rc = -EINVAL;
			continue;
			BNX2X_ERR("Unable to config VLAN %d\n", vlan->vid);
			return rc;
		}

		DP(NETIF_MSG_IFUP, "HW configured for VLAN %d\n", vlan->vid);
		vlan->hw = true;
		bp->vlan_cnt++;
	}

	return rc;
	return 0;
}

static int bnx2x_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
static void bnx2x_vlan_configure(struct bnx2x *bp, bool set_rx_mode)
{
	bool need_accept_any_vlan;

	need_accept_any_vlan = !!bnx2x_vlan_configure_vid_list(bp);

	if (bp->accept_any_vlan != need_accept_any_vlan) {
		bp->accept_any_vlan = need_accept_any_vlan;
		DP(NETIF_MSG_IFUP, "Accept all VLAN %s\n",
		   bp->accept_any_vlan ? "raised" : "cleared");
		if (set_rx_mode) {
			if (IS_PF(bp))
				bnx2x_set_rx_mode_inner(bp);
			else
				bnx2x_vfpf_storm_rx_mode(bp);
		}
	}
}

int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp)
{
	struct bnx2x *bp = netdev_priv(dev);
	struct bnx2x_vlan_entry *vlan;
	bool hw = false;
	int rc = 0;

	if (!netif_running(bp->dev)) {
		DP(NETIF_MSG_IFUP,
		   "Ignoring VLAN configuration the interface is down\n");
		return -EFAULT;
	/* The hw forgot all entries after reload */
	list_for_each_entry(vlan, &bp->vlan_reg, link)
		vlan->hw = false;
	bp->vlan_cnt = 0;

	/* Don't set rx mode here. Our caller will do it. */
	bnx2x_vlan_configure(bp, false);

	return 0;
}

static int bnx2x_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
{
	struct bnx2x *bp = netdev_priv(dev);
	struct bnx2x_vlan_entry *vlan;

	DP(NETIF_MSG_IFUP, "Adding VLAN %d\n", vid);

	vlan = kmalloc(sizeof(*vlan), GFP_KERNEL);
	if (!vlan)
		return -ENOMEM;

	bp->vlan_cnt++;
	if (bp->vlan_cnt > bp->vlan_credit && !bp->accept_any_vlan) {
		DP(NETIF_MSG_IFUP, "Accept all VLAN raised\n");
		bp->accept_any_vlan = true;
		if (IS_PF(bp))
			bnx2x_set_rx_mode_inner(bp);
		else
			bnx2x_vfpf_storm_rx_mode(bp);
	} else if (bp->vlan_cnt <= bp->vlan_credit) {
		rc = __bnx2x_vlan_configure_vid(bp, vid, true);
		hw = true;
	}

	vlan->vid = vid;
	vlan->hw = hw;

	if (!rc) {
		list_add(&vlan->link, &bp->vlan_reg);
	} else {
		bp->vlan_cnt--;
		kfree(vlan);
	}
	vlan->hw = false;
	list_add_tail(&vlan->link, &bp->vlan_reg);

	DP(NETIF_MSG_IFUP, "Adding VLAN result %d\n", rc);
	if (netif_running(dev))
		bnx2x_vlan_configure(bp, true);

	return rc;
	return 0;
}

static int bnx2x_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
{
	struct bnx2x *bp = netdev_priv(dev);
	struct bnx2x_vlan_entry *vlan;
	bool found = false;
	int rc = 0;

	if (!netif_running(bp->dev)) {
		DP(NETIF_MSG_IFUP,
		   "Ignoring VLAN configuration the interface is down\n");
		return -EFAULT;
	}

	DP(NETIF_MSG_IFUP, "Removing VLAN %d\n", vid);

	if (!bp->vlan_cnt) {
		BNX2X_ERR("Unable to kill VLAN %d\n", vid);
		return -EINVAL;
	}

	list_for_each_entry(vlan, &bp->vlan_reg, link)
		if (vlan->vid == vid)
		if (vlan->vid == vid) {
			found = true;
			break;
		}

	if (vlan->vid != vid) {
	if (!found) {
		BNX2X_ERR("Unable to kill VLAN %d - not found\n", vid);
		return -EINVAL;
	}

	if (vlan->hw)
	if (netif_running(dev) && vlan->hw) {
		rc = __bnx2x_vlan_configure_vid(bp, vid, false);
		DP(NETIF_MSG_IFUP, "HW deconfigured for VLAN %d\n", vid);
		bp->vlan_cnt--;
	}

	list_del(&vlan->link);
	kfree(vlan);

	bp->vlan_cnt--;

	if (bp->vlan_cnt <= bp->vlan_credit && bp->accept_any_vlan) {
		/* Configure all non-configured entries */
		list_for_each_entry(vlan, &bp->vlan_reg, link) {
			if (vlan->hw)
				continue;

			rc = __bnx2x_vlan_configure_vid(bp, vlan->vid, true);
			if (rc) {
				BNX2X_ERR("Unable to config VLAN %d\n",
					  vlan->vid);
				continue;
			}
			DP(NETIF_MSG_IFUP, "HW configured for VLAN %d\n",
			   vlan->vid);
			vlan->hw = true;
		}
		DP(NETIF_MSG_IFUP, "Accept all VLAN Removed\n");
		bp->accept_any_vlan = false;
		if (IS_PF(bp))
			bnx2x_set_rx_mode_inner(bp);
		else
			bnx2x_vfpf_storm_rx_mode(bp);
	}
	if (netif_running(dev))
		bnx2x_vlan_configure(bp, true);

	DP(NETIF_MSG_IFUP, "Removing VLAN result %d\n", rc);

+25 −21
Original line number Diff line number Diff line
@@ -286,7 +286,9 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
			cpu_to_le32(DB_KEY_TX_PUSH | DB_LONG_TX_PUSH | prod);
		txr->tx_prod = prod;

		tx_buf->is_push = 1;
		netdev_tx_sent_queue(txq, skb->len);
		wmb();	/* Sync is_push and byte queue before pushing data */

		push_len = (length + sizeof(*tx_push) + 7) / 8;
		if (push_len > 16) {
@@ -298,7 +300,6 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
					 push_len);
		}

		tx_buf->is_push = 1;
		goto tx_done;
	}

@@ -1112,19 +1113,13 @@ static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp,
	if (tpa_info->hash_type != PKT_HASH_TYPE_NONE)
		skb_set_hash(skb, tpa_info->rss_hash, tpa_info->hash_type);

	if (tpa_info->flags2 & RX_CMP_FLAGS2_META_FORMAT_VLAN) {
		netdev_features_t features = skb->dev->features;
	if ((tpa_info->flags2 & RX_CMP_FLAGS2_META_FORMAT_VLAN) &&
	    (skb->dev->features & NETIF_F_HW_VLAN_CTAG_RX)) {
		u16 vlan_proto = tpa_info->metadata >>
			RX_CMP_FLAGS2_METADATA_TPID_SFT;
		u16 vtag = tpa_info->metadata & RX_CMP_FLAGS2_METADATA_VID_MASK;

		if (((features & NETIF_F_HW_VLAN_CTAG_RX) &&
		     vlan_proto == ETH_P_8021Q) ||
		    ((features & NETIF_F_HW_VLAN_STAG_RX) &&
		     vlan_proto == ETH_P_8021AD)) {
			__vlan_hwaccel_put_tag(skb, htons(vlan_proto),
					       tpa_info->metadata &
					       RX_CMP_FLAGS2_METADATA_VID_MASK);
		}
		__vlan_hwaccel_put_tag(skb, htons(vlan_proto), vtag);
	}

	skb_checksum_none_assert(skb);
@@ -1277,19 +1272,14 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons,

	skb->protocol = eth_type_trans(skb, dev);

	if (rxcmp1->rx_cmp_flags2 &
	    cpu_to_le32(RX_CMP_FLAGS2_META_FORMAT_VLAN)) {
		netdev_features_t features = skb->dev->features;
	if ((rxcmp1->rx_cmp_flags2 &
	     cpu_to_le32(RX_CMP_FLAGS2_META_FORMAT_VLAN)) &&
	    (skb->dev->features & NETIF_F_HW_VLAN_CTAG_RX)) {
		u32 meta_data = le32_to_cpu(rxcmp1->rx_cmp_meta_data);
		u16 vtag = meta_data & RX_CMP_FLAGS2_METADATA_VID_MASK;
		u16 vlan_proto = meta_data >> RX_CMP_FLAGS2_METADATA_TPID_SFT;

		if (((features & NETIF_F_HW_VLAN_CTAG_RX) &&
		     vlan_proto == ETH_P_8021Q) ||
		    ((features & NETIF_F_HW_VLAN_STAG_RX) &&
		     vlan_proto == ETH_P_8021AD))
			__vlan_hwaccel_put_tag(skb, htons(vlan_proto),
					       meta_data &
					       RX_CMP_FLAGS2_METADATA_VID_MASK);
		__vlan_hwaccel_put_tag(skb, htons(vlan_proto), vtag);
	}

	skb_checksum_none_assert(skb);
@@ -5466,6 +5456,20 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,

	if (!bnxt_rfs_capable(bp))
		features &= ~NETIF_F_NTUPLE;

	/* Both CTAG and STAG VLAN accelaration on the RX side have to be
	 * turned on or off together.
	 */
	if ((features & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX)) !=
	    (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX)) {
		if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
			features &= ~(NETIF_F_HW_VLAN_CTAG_RX |
				      NETIF_F_HW_VLAN_STAG_RX);
		else
			features |= NETIF_F_HW_VLAN_CTAG_RX |
				    NETIF_F_HW_VLAN_STAG_RX;
	}

	return features;
}

+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
	CH_PCI_ID_TABLE_FENTRY(0x5015),	/* T502-bt */
	CH_PCI_ID_TABLE_FENTRY(0x5016),	/* T580-OCP-SO */
	CH_PCI_ID_TABLE_FENTRY(0x5017),	/* T520-OCP-SO */
	CH_PCI_ID_TABLE_FENTRY(0x5018),	/* T540-BT */
	CH_PCI_ID_TABLE_FENTRY(0x5080),	/* Custom T540-cr */
	CH_PCI_ID_TABLE_FENTRY(0x5081),	/* Custom T540-LL-cr */
	CH_PCI_ID_TABLE_FENTRY(0x5082),	/* Custom T504-cr */
+4 −3
Original line number Diff line number Diff line
@@ -1195,7 +1195,7 @@ static int ethoc_probe(struct platform_device *pdev)
	priv->mdio = mdiobus_alloc();
	if (!priv->mdio) {
		ret = -ENOMEM;
		goto free;
		goto free2;
	}

	priv->mdio->name = "ethoc-mdio";
@@ -1208,7 +1208,7 @@ static int ethoc_probe(struct platform_device *pdev)
	ret = mdiobus_register(priv->mdio);
	if (ret) {
		dev_err(&netdev->dev, "failed to register MDIO bus\n");
		goto free;
		goto free2;
	}

	ret = ethoc_mdio_probe(netdev);
@@ -1241,9 +1241,10 @@ static int ethoc_probe(struct platform_device *pdev)
error:
	mdiobus_unregister(priv->mdio);
	mdiobus_free(priv->mdio);
free:
free2:
	if (priv->clk)
		clk_disable_unprepare(priv->clk);
free:
	free_netdev(netdev);
out:
	return ret;
Loading