projects/linux·commit 698ea54d

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

698ea54d · Linus Torvalds <[email protected]> · 2016-06-10 08:32:24 -07:00

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
  ...
Commit
698ea54dde6768d4a96080d0fb796cb3a4eadaf8
Parents
729d3784 · 50219538

Merge commit. Changes below are compared with the first parent: 729d3784.

Changes

93 files changed · +828 −460

FileStatusAddDelContent
MAINTAINERSmodified+1−0View file
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.cmodified+62−89View file
drivers/net/ethernet/broadcom/bnxt/bnxt.cmodified+25−21View file
drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.hmodified+1−0View file
drivers/net/ethernet/ethoc.cmodified+4−3View file
drivers/net/ethernet/freescale/fec_main.cmodified+4−4View file
drivers/net/ethernet/freescale/gianfar.cmodified+2−1View file
drivers/net/ethernet/mediatek/mtk_eth_soc.cmodified+34−6View file
drivers/net/ethernet/mellanox/mlx5/core/en_main.cmodified+1−4View file
drivers/net/ethernet/mellanox/mlx5/core/en_tx.cmodified+2−1View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch.cmodified+43−26View file
drivers/net/ethernet/mellanox/mlx5/core/fs_core.cmodified+25−15View file
drivers/net/ethernet/mellanox/mlx5/core/qp.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/vport.cmodified+38−0View file
drivers/net/ethernet/mellanox/mlxsw/spectrum.cmodified+112−91View file
drivers/net/ethernet/mellanox/mlxsw/spectrum.hmodified+5−0View file
drivers/net/ethernet/qlogic/qed/qed_main.cmodified+36−9View file
drivers/net/ethernet/qlogic/qed/qed_sriov.hmodified+3−1View file
drivers/net/ethernet/qlogic/qede/qede_main.cmodified+2−0View file
drivers/net/ethernet/sfc/mcdi_port.cmodified+4−3View file
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.cmodified+1−1View file
drivers/net/ethernet/stmicro/stmmac/stmmac_main.cmodified+4−2View file
drivers/net/ethernet/ti/cpsw.cmodified+1−1View file
drivers/net/vmxnet3/vmxnet3_drv.cmodified+1−1View file
drivers/net/vmxnet3/vmxnet3_int.hmodified+2−2View file
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cmodified+16−0View file
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.cmodified+2−0View file
drivers/net/wireless/mac80211_hwsim.cmodified+1−0View file
drivers/net/wireless/realtek/rtlwifi/core.cmodified+3−3View file
include/linux/mlx5/device.hmodified+6−2View file
include/linux/mlx5/mlx5_ifc.hmodified+9−3View file
include/linux/mlx5/qp.hmodified+1−0View file
include/linux/mlx5/vport.hmodified+2−0View file
include/net/compat.hmodified+1−0View file
include/net/ip_vs.hmodified+1−1View file
include/net/netfilter/nf_queue.hmodified+2−2View file
include/net/netns/netfilter.hmodified+2−0View file
include/net/pkt_cls.hmodified+7−3View file
include/net/sch_generic.hmodified+5−1View file
include/uapi/linux/gtp.hmodified+1−1View file
kernel/trace/bpf_trace.cmodified+2−2View file
net/bridge/br_fdb.cmodified+2−0View file
net/compat.cmodified+17−3View file
net/core/gen_stats.cmodified+2−0View file
net/core/net-sysfs.cmodified+1−0View file
net/ipv4/udp.cmodified+5−5View file
net/ipv6/ip6_gre.cmodified+3−0View file
net/ipv6/ip6_output.cmodified+3−8View file
net/ipv6/netfilter/nf_dup_ipv6.cmodified+1−0View file
net/ipv6/tcp_ipv6.cmodified+3−1View file
net/ipv6/udp.cmodified+6−6View file
net/l2tp/l2tp_core.cmodified+1−1View file
net/mac80211/mesh.cmodified+4−0View file
net/mac80211/sta_info.hmodified+1−1View file
net/netfilter/ipvs/ip_vs_conn.cmodified+3−2View file
net/netfilter/ipvs/ip_vs_core.cmodified+3−2View file
net/netfilter/nf_conntrack_ftp.cmodified+1−0View file
net/netfilter/nf_conntrack_helper.cmodified+4−5View file
net/netfilter/nf_conntrack_irc.cmodified+1−0View file
net/netfilter/nf_conntrack_sane.cmodified+1−0View file
net/netfilter/nf_conntrack_sip.cmodified+1−0View file
net/netfilter/nf_conntrack_standalone.cmodified+0−2View file
net/netfilter/nf_conntrack_tftp.cmodified+1−0View file
net/netfilter/nf_queue.cmodified+8−9View file
net/netfilter/nf_tables_api.cmodified+2−0View file
net/netfilter/nfnetlink_queue.cmodified+13−7View file
net/netfilter/x_tables.cmodified+2−2View file
net/packet/af_packet.cmodified+25−0View file
net/rds/rds.hmodified+2−0View file
net/rds/recv.cmodified+2−0View file
net/rds/send.cmodified+1−0View file
net/rds/tcp.cmodified+75−3View file
net/rds/tcp.hmodified+1−0View file
net/rds/tcp_connect.cmodified+1−1View file
net/rds/tcp_listen.cmodified+7−13View file
net/rds/threads.cmodified+8−2View file
net/rxrpc/rxkad.cmodified+1−3View file
net/sched/act_police.cmodified+11−22View file
net/sched/cls_flower.cmodified+3−3View file
net/sched/cls_u32.cmodified+40−32View file
net/sched/sch_drr.cmodified+4−0View file
net/sched/sch_fq_codel.cmodified+19−7View file
net/sched/sch_generic.cmodified+2−0View file
net/sched/sch_hfsc.cmodified+4−8View file
net/sched/sch_ingress.cmodified+12−0View file
net/sched/sch_prio.cmodified+4−0View file
net/sched/sch_qfq.cmodified+4−2View file
net/sched/sch_red.cmodified+4−0View file
net/sched/sch_tbf.cmodified+4−0View file
net/tipc/netlink_compat.cmodified+2−1View file
net/wireless/core.cmodified+0−2View file
net/wireless/wext-core.cmodified+23−2View file
tools/testing/selftests/net/reuseport_bpf.cmodified+5−5View file

Only the first 600 diff lines are shown. Download the complete patch.

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 66de4da..2ebe195 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

View file
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index c5fe915..a59d55e 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12895,52 +12895,71 @@ 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 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_vlan_entry *vlan;
+
+ /* 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;
- 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;
- }
DP(NETIF_MSG_IFUP, "Adding VLAN %d\n", vid);
@@ -12948,93 +12967,47 @@ static int bnx2x_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
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;
+ vlan->hw = false;
+ list_add_tail(&vlan->link, &bp->vlan_reg);
- if (!rc) {
- list_add(&vlan->link, &bp->vlan_reg);
- } else {
- bp->vlan_cnt--;
- kfree(vlan);
- }
-
- 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);

drivers/net/ethernet/broadcom/bnxt/bnxt.c

View file
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 72a2eff..c777cde 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -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;
}

drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h

View file
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
index a2cdfc1..50812a1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
@@ -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 */

drivers/net/ethernet/ethoc.c

View file
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 41b0106..4edb98c 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -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 @@ error2:
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;

drivers/net/ethernet/freescale/fec_main.c

View file
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 3c0255e..fea0f33 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2416,24 +2416,24 @@ fec_enet_set_coalesce(struct net_device *ndev, struct ethtool_coalesce *ec)
return -EOPNOTSUPP;
if (ec->rx_max_coalesced_frames > 255) {
- pr_err("Rx coalesced frames exceed hardware limiation");
+ pr_err("Rx coalesced frames exceed hardware limitation\n");
return -EINVAL;
}
if (ec->tx_max_coalesced_frames > 255) {
- pr_err("Tx coalesced frame exceed hardware limiation");
+ pr_err("Tx coalesced frame exceed hardware limitation\n");
return -EINVAL;
}
cycle = fec_enet_us_to_itr_clock(ndev, fep->rx_time_itr);
if (cycle > 0xFFFF) {
- pr_err("Rx coalesed usec exceeed hardware limiation");
+ pr_err("Rx coalesced usec exceed hardware limitation\n");
return -EINVAL;
}
cycle = fec_enet_us_to_itr_clock(ndev, fep->tx_time_itr);
if (cycle > 0xFFFF) {
- pr_err("Rx coalesed usec exceeed hardware limiation");
+ pr_err("Rx coalesced usec exceed hardware limitation\n");
return -EINVAL;
}

drivers/net/ethernet/freescale/gianfar.c

View file
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 7615e06..2e6785b 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2440,7 +2440,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_queue->tx_ring_size);
if (likely(!nr_frags)) {
- lstatus |= BD_LFLAG(TXBD_LAST | TXBD_INTERRUPT);
+ if (likely(!do_tstamp))
+ lstatus |= BD_LFLAG(TXBD_LAST | TXBD_INTERRUPT);
} else {
u32 lstatus_start = lstatus;

drivers/net/ethernet/mediatek/mtk_eth_soc.c

View file
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index c984462..4763252 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -133,6 +133,8 @@ static int mtk_mdio_read(struct mii_bus *bus, int phy_addr, int phy_reg)
static void mtk_phy_link_adjust(struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
+ u16 lcl_adv = 0, rmt_adv = 0;
+ u8 flowctrl;
u32 mcr = MAC_MCR_MAX_RX_1536 | MAC_MCR_IPG_CFG |
MAC_MCR_FORCE_MODE | MAC_MCR_TX_EN |
MAC_MCR_RX_EN | MAC_MCR_BACKOFF_EN |
@@ -150,11 +152,30 @@ static void mtk_phy_link_adjust(struct net_device *dev)
if (mac->phy_dev->link)
mcr |= MAC_MCR_FORCE_LINK;
- if (mac->phy_dev->duplex)
+ if (mac->phy_dev->duplex) {
mcr |= MAC_MCR_FORCE_DPX;
- if (mac->phy_dev->pause)
- mcr |= MAC_MCR_FORCE_RX_FC | MAC_MCR_FORCE_TX_FC;
+ if (mac->phy_dev->pause)
+ rmt_adv = LPA_PAUSE_CAP;
+ if (mac->phy_dev->asym_pause)
+ rmt_adv |= LPA_PAUSE_ASYM;
+
+ if (mac->phy_dev->advertising & ADVERTISED_Pause)
+ lcl_adv |= ADVERTISE_PAUSE_CAP;
+ if (mac->phy_dev->advertising & ADVERTISED_Asym_Pause)
+ lcl_adv |= ADVERTISE_PAUSE_ASYM;
+
+ flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv);
+
+ if (flowctrl & FLOW_CTRL_TX)
+ mcr |= MAC_MCR_FORCE_TX_FC;
+ if (flowctrl & FLOW_CTRL_RX)
+ mcr |= MAC_MCR_FORCE_RX_FC;
+
+ netif_dbg(mac->hw, link, dev, "rx pause %s, tx pause %s\n",
+ flowctrl & FLOW_CTRL_RX ? "enabled" : "disabled",
+ flowctrl & FLOW_CTRL_TX ? "enabled" : "disabled");
+ }
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
@@ -208,10 +229,16 @@ static int mtk_phy_connect(struct mtk_mac *mac)
u32 val, ge_mode;
np = of_parse_phandle(mac->of_node, "phy-handle", 0);
+ if (!np && of_phy_is_fixed_link(mac->of_node))
+ if (!of_phy_register_fixed_link(mac->of_node))
+ np = of_node_get(mac->of_node);
if (!np)
return -ENODEV;
switch (of_get_phy_mode(np)) {
+ case PHY_INTERFACE_MODE_RGMII_TXID:
+ case PHY_INTERFACE_MODE_RGMII_RXID:
+ case PHY_INTERFACE_MODE_RGMII_ID:
case PHY_INTERFACE_MODE_RGMII:
ge_mode = 0;
break;
@@ -236,7 +263,8 @@ static int mtk_phy_connect(struct mtk_mac *mac)
mac->phy_dev->autoneg = AUTONEG_ENABLE;
mac->phy_dev->speed = 0;
mac->phy_dev->duplex = 0;
- mac->phy_dev->supported &= PHY_BASIC_FEATURES;
+ mac->phy_dev->supported &= PHY_GBIT_FEATURES | SUPPORTED_Pause |
+ SUPPORTED_Asym_Pause;
mac->phy_dev->advertising = mac->phy_dev->supported |
ADVERTISED_Autoneg;
phy_start_aneg(mac->phy_dev);
@@ -280,7 +308,7 @@ static int mtk_mdio_init(struct mtk_eth *eth)
return 0;
err_free_bus:
- kfree(eth->mii_bus);
+ mdiobus_free(eth->mii_bus);
err_put_node:
of_node_put(mii_np);
@@ -295,7 +323,7 @@ static void mtk_mdio_cleanup(struct mtk_eth *eth)
mdiobus_unregister(eth->mii_bus);
of_node_put(eth->mii_bus->dev.of_node);
- kfree(eth->mii_bus);
+ mdiobus_free(eth->mii_bus);
}
static inline void mtk_irq_disable(struct mtk_eth *eth, u32 mask)

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

View file
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index fd43929..f5c8d5d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3192,10 +3192,7 @@ static void mlx5e_destroy_netdev(struct mlx5_core_dev *mdev, void *vpriv)
flush_workqueue(priv->wq);
if (test_bit(MLX5_INTERFACE_STATE_SHUTDOWN, &mdev->intf_state)) {
netif_device_detach(netdev);
- mutex_lock(&priv->state_lock);
- if (test_bit(MLX5E_STATE_OPENED, &priv->state))
- mlx5e_close_locked(netdev);
- mutex_unlock(&priv->state_lock);
+ mlx5e_close(netdev);
} else {
unregister_netdev(netdev);
}

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

View file
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
index 229ab16..b000ddc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -317,7 +317,8 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)
while ((sq->pc & wq->sz_m1) > sq->edge)
mlx5e_send_nop(sq, false);
- sq->bf_budget = bf ? sq->bf_budget - 1 : 0;
+ if (bf)
+ sq->bf_budget--;
sq->stats.packets++;
sq->stats.bytes += num_bytes;

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

View file
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index b84a691..aebbd6c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -383,7 +383,7 @@ __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u32 vport, bool rx_rule,
match_v,
MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,
0, &dest);
- if (IS_ERR_OR_NULL(flow_rule)) {
+ if (IS_ERR(flow_rule)) {
pr_warn(
"FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n",
dmac_v, dmac_c, vport, PTR_ERR(flow_rule));
@@ -457,7 +457,7 @@ static int esw_create_fdb_table(struct mlx5_eswitch *esw, int nvports)
table_size = BIT(MLX5_CAP_ESW_FLOWTABLE_FDB(dev, log_max_ft_size));
fdb = mlx5_create_flow_table(root_ns, 0, table_size, 0);
- if (IS_ERR_OR_NULL(fdb)) {
+ if (IS_ERR(fdb)) {
err = PTR_ERR(fdb);
esw_warn(dev, "Failed to create FDB Table err %d\n", err);
goto out;
@@ -474,7 +474,7 @@ static int esw_create_fdb_table(struct mlx5_eswitch *esw, int nvports)
MLX5_SET(create_flow_group_in, flow_group_in, end_flow_index, table_size - 3);
eth_broadcast_addr(dmac);
g = mlx5_create_flow_group(fdb, flow_group_in);
- if (IS_ERR_OR_NULL(g)) {
+ if (IS_ERR(g)) {
err = PTR_ERR(g);
esw_warn(dev, "Failed to create flow group err(%d)\n", err);
goto out;
@@ -489,7 +489,7 @@ static int esw_create_fdb_table(struct mlx5_eswitch *esw, int nvports)
eth_zero_addr(dmac);
dmac[0] = 0x01;
g = mlx5_create_flow_group(fdb, flow_group_in);
- if (IS_ERR_OR_NULL(g)) {
+ if (IS_ERR(g)) {
err = PTR_ERR(g);
esw_warn(dev, "Failed to create allmulti flow group err(%d)\n", err);
goto out;
@@ -506,7 +506,7 @@ static int esw_create_fdb_table(struct mlx5_eswitch *esw, int nvports)
MLX5_SET(create_flow_group_in, flow_group_in, start_flow_index, table_size - 1);
MLX5_SET(create_flow_group_in, flow_group_in, end_flow_index, table_size - 1);
g = mlx5_create_flow_group(fdb, flow_group_in);
- if (IS_ERR_OR_NULL(g)) {
+ if (IS_ERR(g)) {
err = PTR_ERR(g);
esw_warn(dev, "Failed to create promisc flow group err(%d)\n", err);
goto out;
@@ -529,7 +529,7 @@ out:
}
}
- kfree(flow_group_in);
+ kvfree(flow_group_in);
return err;
}
@@ -651,6 +651,7 @@ static void update_allmulti_vports(struct mlx5_eswitch *esw,
esw_fdb_set_vport_rule(esw,
mac,
vport_idx);
+ iter_vaddr->mc_promisc = true;
break;
case MLX5_ACTION_DEL:
if (!iter_vaddr)
@@ -1060,7 +1061,7 @@ static void esw_vport_enable_egress_acl(struct mlx5_eswitch *esw,
return;

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/qp.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/vport.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_sriov.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qede/qede_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/sfc/mcdi_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/ti/cpsw.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vmxnet3/vmxnet3_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vmxnet3/vmxnet3_int.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/mac80211_hwsim.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/realtek/rtlwifi/core.c

View file

This diff is incomplete. Download the complete patch.

include/linux/mlx5/device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mlx5/mlx5_ifc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mlx5/qp.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mlx5/vport.h

View file

This diff is incomplete. Download the complete patch.

include/net/compat.h

View file

This diff is incomplete. Download the complete patch.

include/net/ip_vs.h

View file

This diff is incomplete. Download the complete patch.

include/net/netfilter/nf_queue.h

View file

This diff is incomplete. Download the complete patch.

include/net/netns/netfilter.h

View file

This diff is incomplete. Download the complete patch.

include/net/pkt_cls.h

View file

This diff is incomplete. Download the complete patch.

include/net/sch_generic.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/gtp.h

View file

This diff is incomplete. Download the complete patch.

kernel/trace/bpf_trace.c

View file

This diff is incomplete. Download the complete patch.

net/bridge/br_fdb.c

View file

This diff is incomplete. Download the complete patch.

net/compat.c

View file

This diff is incomplete. Download the complete patch.

net/core/gen_stats.c

View file

This diff is incomplete. Download the complete patch.

net/core/net-sysfs.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/udp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ip6_gre.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ip6_output.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/netfilter/nf_dup_ipv6.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/tcp_ipv6.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/udp.c

View file

This diff is incomplete. Download the complete patch.

net/l2tp/l2tp_core.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/mesh.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/sta_info.h

View file

This diff is incomplete. Download the complete patch.

net/netfilter/ipvs/ip_vs_conn.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/ipvs/ip_vs_core.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_ftp.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_helper.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_irc.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_sane.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_sip.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_standalone.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_tftp.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_queue.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_tables_api.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink_queue.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/x_tables.c

View file

This diff is incomplete. Download the complete patch.

net/packet/af_packet.c

View file

This diff is incomplete. Download the complete patch.

net/rds/rds.h

View file

This diff is incomplete. Download the complete patch.

net/rds/recv.c

View file

This diff is incomplete. Download the complete patch.

net/rds/send.c

View file

This diff is incomplete. Download the complete patch.

net/rds/tcp.c

View file

This diff is incomplete. Download the complete patch.

net/rds/tcp.h

View file

This diff is incomplete. Download the complete patch.

net/rds/tcp_connect.c

View file

This diff is incomplete. Download the complete patch.

net/rds/tcp_listen.c

View file

This diff is incomplete. Download the complete patch.

net/rds/threads.c

View file

This diff is incomplete. Download the complete patch.

net/rxrpc/rxkad.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_police.c

View file

This diff is incomplete. Download the complete patch.

net/sched/cls_flower.c

View file

This diff is incomplete. Download the complete patch.

net/sched/cls_u32.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_drr.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_fq_codel.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_generic.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_hfsc.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_ingress.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_prio.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_qfq.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_red.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_tbf.c

View file

This diff is incomplete. Download the complete patch.

net/tipc/netlink_compat.c

View file

This diff is incomplete. Download the complete patch.

net/wireless/core.c

View file

This diff is incomplete. Download the complete patch.

net/wireless/wext-core.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/reuseport_bpf.c

View file

This diff is incomplete. Download the complete patch.