--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 16 Apr 2020 17:57:40 +0200
+Subject: amd-xgbe: Use __napi_schedule() in BH context
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+[ Upstream commit d518691cbd3be3dae218e05cca3f3fc9b2f1aa77 ]
+
+The driver uses __napi_schedule_irqoff() which is fine as long as it is
+invoked with disabled interrupts by everybody. Since the commit
+mentioned below the driver may invoke xgbe_isr_task() in tasklet/softirq
+context. This may lead to list corruption if another driver uses
+__napi_schedule_irqoff() in IRQ context.
+
+Use __napi_schedule() which safe to use from IRQ and softirq context.
+
+Fixes: 85b85c853401d ("amd-xgbe: Re-issue interrupt if interrupt status not cleared")
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
+Cc: Tom Lendacky <thomas.lendacky@amd.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+@@ -514,7 +514,7 @@ static void xgbe_isr_task(unsigned long
+ xgbe_disable_rx_tx_ints(pdata);
+
+ /* Turn on polling */
+- __napi_schedule_irqoff(&pdata->napi);
++ __napi_schedule(&pdata->napi);
+ }
+ } else {
+ /* Don't clear Rx/Tx status if doing per channel DMA
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Taehee Yoo <ap420073@gmail.com>
+Date: Tue, 7 Apr 2020 13:23:21 +0000
+Subject: hsr: check protocol version in hsr_newlink()
+
+From: Taehee Yoo <ap420073@gmail.com>
+
+[ Upstream commit 4faab8c446def7667adf1f722456c2f4c304069c ]
+
+In the current hsr code, only 0 and 1 protocol versions are valid.
+But current hsr code doesn't check the version, which is received by
+userspace.
+
+Test commands:
+ ip link add dummy0 type dummy
+ ip link add dummy1 type dummy
+ ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 version 4
+
+In the test commands, version 4 is invalid.
+So, the command should be failed.
+
+After this patch, following error will occur.
+"Error: hsr: Only versions 0..1 are supported."
+
+Fixes: ee1c27977284 ("net/hsr: Added support for HSR v1")
+Signed-off-by: Taehee Yoo <ap420073@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/hsr/hsr_netlink.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/net/hsr/hsr_netlink.c
++++ b/net/hsr/hsr_netlink.c
+@@ -61,10 +61,16 @@ static int hsr_newlink(struct net *src_n
+ else
+ multicast_spec = nla_get_u8(data[IFLA_HSR_MULTICAST_SPEC]);
+
+- if (!data[IFLA_HSR_VERSION])
++ if (!data[IFLA_HSR_VERSION]) {
+ hsr_version = 0;
+- else
++ } else {
+ hsr_version = nla_get_u8(data[IFLA_HSR_VERSION]);
++ if (hsr_version > 1) {
++ NL_SET_ERR_MSG_MOD(extack,
++ "Only versions 0..1 are supported");
++ return -EINVAL;
++ }
++ }
+
+ return hsr_dev_finalize(dev, link, multicast_spec, hsr_version);
+ }
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: "Michael Weiß" <michael.weiss@aisec.fraunhofer.de>
+Date: Tue, 7 Apr 2020 13:11:48 +0200
+Subject: l2tp: Allow management of tunnels and session in user namespace
+
+From: "Michael Weiß" <michael.weiss@aisec.fraunhofer.de>
+
+[ Upstream commit 2abe05234f2e892728c388169631e4b99f354c86 ]
+
+Creation and management of L2TPv3 tunnels and session through netlink
+requires CAP_NET_ADMIN. However, a process with CAP_NET_ADMIN in a
+non-initial user namespace gets an EPERM due to the use of the
+genetlink GENL_ADMIN_PERM flag. Thus, management of L2TP VPNs inside
+an unprivileged container won't work.
+
+We replaced the GENL_ADMIN_PERM by the GENL_UNS_ADMIN_PERM flag
+similar to other network modules which also had this problem, e.g.,
+openvswitch (commit 4a92602aa1cd "openvswitch: allow management from
+inside user namespaces") and nl80211 (commit 5617c6cd6f844 "nl80211:
+Allow privileged operations from user namespaces").
+
+I tested this in the container runtime trustm3 (trustm3.github.io)
+and was able to create l2tp tunnels and sessions in unpriviliged
+(user namespaced) containers using a private network namespace.
+For other runtimes such as docker or lxc this should work, too.
+
+Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/l2tp/l2tp_netlink.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/net/l2tp/l2tp_netlink.c
++++ b/net/l2tp/l2tp_netlink.c
+@@ -920,51 +920,51 @@ static const struct genl_ops l2tp_nl_ops
+ .cmd = L2TP_CMD_TUNNEL_CREATE,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_tunnel_create,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_TUNNEL_DELETE,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_tunnel_delete,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_TUNNEL_MODIFY,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_tunnel_modify,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_TUNNEL_GET,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_tunnel_get,
+ .dumpit = l2tp_nl_cmd_tunnel_dump,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_SESSION_CREATE,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_session_create,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_SESSION_DELETE,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_session_delete,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_SESSION_MODIFY,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_session_modify,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ {
+ .cmd = L2TP_CMD_SESSION_GET,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+ .doit = l2tp_nl_cmd_session_get,
+ .dumpit = l2tp_nl_cmd_session_dump,
+- .flags = GENL_ADMIN_PERM,
++ .flags = GENL_UNS_ADMIN_PERM,
+ },
+ };
+
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: DENG Qingfang <dqfext@gmail.com>
+Date: Tue, 14 Apr 2020 14:34:08 +0800
+Subject: net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode
+
+From: DENG Qingfang <dqfext@gmail.com>
+
+[ Upstream commit e045124e93995fe01e42ed530003ddba5d55db4f ]
+
+In VLAN-unaware mode, the Egress Tag (EG_TAG) field in Port VLAN
+Control register must be set to Consistent to let tagged frames pass
+through as is, otherwise their tags will be stripped.
+
+Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530")
+Signed-off-by: DENG Qingfang <dqfext@gmail.com>
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Tested-by: René van Dorst <opensource@vdorst.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/mt7530.c | 18 ++++++++++++------
+ drivers/net/dsa/mt7530.h | 7 +++++++
+ 2 files changed, 19 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -857,8 +857,9 @@ mt7530_port_set_vlan_unaware(struct dsa_
+ */
+ mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
+ MT7530_PORT_MATRIX_MODE);
+- mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK,
+- VLAN_ATTR(MT7530_VLAN_TRANSPARENT));
++ mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK | PVC_EG_TAG_MASK,
++ VLAN_ATTR(MT7530_VLAN_TRANSPARENT) |
++ PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+
+ for (i = 0; i < MT7530_NUM_PORTS; i++) {
+ if (dsa_is_user_port(ds, i) &&
+@@ -874,8 +875,8 @@ mt7530_port_set_vlan_unaware(struct dsa_
+ if (all_user_ports_removed) {
+ mt7530_write(priv, MT7530_PCR_P(MT7530_CPU_PORT),
+ PCR_MATRIX(dsa_user_ports(priv->ds)));
+- mt7530_write(priv, MT7530_PVC_P(MT7530_CPU_PORT),
+- PORT_SPEC_TAG);
++ mt7530_write(priv, MT7530_PVC_P(MT7530_CPU_PORT), PORT_SPEC_TAG
++ | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ }
+ }
+
+@@ -901,8 +902,9 @@ mt7530_port_set_vlan_aware(struct dsa_sw
+ /* Set the port as a user port which is to be able to recognize VID
+ * from incoming packets before fetching entry within the VLAN table.
+ */
+- mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK,
+- VLAN_ATTR(MT7530_VLAN_USER));
++ mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK | PVC_EG_TAG_MASK,
++ VLAN_ATTR(MT7530_VLAN_USER) |
++ PVC_EG_TAG(MT7530_VLAN_EG_DISABLED));
+ }
+
+ static void
+@@ -1332,6 +1334,10 @@ mt7530_setup(struct dsa_switch *ds)
+ mt7530_cpu_port_enable(priv, i);
+ else
+ mt7530_port_disable(ds, i);
++
++ /* Enable consistent egress tag */
++ mt7530_rmw(priv, MT7530_PVC_P(i), PVC_EG_TAG_MASK,
++ PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ }
+
+ /* Setup port 5 */
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -167,9 +167,16 @@ enum mt7530_port_mode {
+ /* Register for port vlan control */
+ #define MT7530_PVC_P(x) (0x2010 + ((x) * 0x100))
+ #define PORT_SPEC_TAG BIT(5)
++#define PVC_EG_TAG(x) (((x) & 0x7) << 8)
++#define PVC_EG_TAG_MASK PVC_EG_TAG(7)
+ #define VLAN_ATTR(x) (((x) & 0x3) << 6)
+ #define VLAN_ATTR_MASK VLAN_ATTR(3)
+
++enum mt7530_vlan_port_eg_tag {
++ MT7530_VLAN_EG_DISABLED = 0,
++ MT7530_VLAN_EG_CONSISTENT = 1,
++};
++
+ enum mt7530_vlan_port_attr {
+ MT7530_VLAN_USER = 0,
+ MT7530_VLAN_TRANSPARENT = 3,
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: "René van Dorst" <opensource@vdorst.com>
+Date: Mon, 6 Apr 2020 05:42:53 +0800
+Subject: net: dsa: mt7530: move mt7623 settings out off the mt7530
+
+From: "René van Dorst" <opensource@vdorst.com>
+
+[ Upstream commit 84d2f7b708c374a15a2abe092a74e0e47d018286 ]
+
+Moving mt7623 logic out off mt7530, is required to make hardware setting
+consistent after we introduce phylink to mtk driver.
+
+Fixes: ca366d6c889b ("net: dsa: mt7530: Convert to PHYLINK API")
+Reviewed-by: Sean Wang <sean.wang@mediatek.com>
+Tested-by: Sean Wang <sean.wang@mediatek.com>
+Signed-off-by: René van Dorst <opensource@vdorst.com>
+Tested-by: Frank Wunderlich <frank-w@public-files.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/mt7530.c | 85 -----------------------------------------------
+ drivers/net/dsa/mt7530.h | 10 -----
+ 2 files changed, 95 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -67,58 +67,6 @@ static const struct mt7530_mib_desc mt75
+ };
+
+ static int
+-mt7623_trgmii_write(struct mt7530_priv *priv, u32 reg, u32 val)
+-{
+- int ret;
+-
+- ret = regmap_write(priv->ethernet, TRGMII_BASE(reg), val);
+- if (ret < 0)
+- dev_err(priv->dev,
+- "failed to priv write register\n");
+- return ret;
+-}
+-
+-static u32
+-mt7623_trgmii_read(struct mt7530_priv *priv, u32 reg)
+-{
+- int ret;
+- u32 val;
+-
+- ret = regmap_read(priv->ethernet, TRGMII_BASE(reg), &val);
+- if (ret < 0) {
+- dev_err(priv->dev,
+- "failed to priv read register\n");
+- return ret;
+- }
+-
+- return val;
+-}
+-
+-static void
+-mt7623_trgmii_rmw(struct mt7530_priv *priv, u32 reg,
+- u32 mask, u32 set)
+-{
+- u32 val;
+-
+- val = mt7623_trgmii_read(priv, reg);
+- val &= ~mask;
+- val |= set;
+- mt7623_trgmii_write(priv, reg, val);
+-}
+-
+-static void
+-mt7623_trgmii_set(struct mt7530_priv *priv, u32 reg, u32 val)
+-{
+- mt7623_trgmii_rmw(priv, reg, 0, val);
+-}
+-
+-static void
+-mt7623_trgmii_clear(struct mt7530_priv *priv, u32 reg, u32 val)
+-{
+- mt7623_trgmii_rmw(priv, reg, val, 0);
+-}
+-
+-static int
+ core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad)
+ {
+ struct mii_bus *bus = priv->bus;
+@@ -530,27 +478,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
+ mt7530_rmw(priv, MT7530_TRGMII_RD(i),
+ RD_TAP_MASK, RD_TAP(16));
+- else
+- if (priv->id != ID_MT7621)
+- mt7623_trgmii_set(priv, GSW_INTF_MODE,
+- INTF_MODE_TRGMII);
+-
+- return 0;
+-}
+-
+-static int
+-mt7623_pad_clk_setup(struct dsa_switch *ds)
+-{
+- struct mt7530_priv *priv = ds->priv;
+- int i;
+-
+- for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
+- mt7623_trgmii_write(priv, GSW_TRGMII_TD_ODT(i),
+- TD_DM_DRVP(8) | TD_DM_DRVN(8));
+-
+- mt7623_trgmii_set(priv, GSW_TRGMII_RCK_CTRL, RX_RST | RXC_DQSISEL);
+- mt7623_trgmii_clear(priv, GSW_TRGMII_RCK_CTRL, RX_RST);
+-
+ return 0;
+ }
+
+@@ -1257,10 +1184,6 @@ mt7530_setup(struct dsa_switch *ds)
+ dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
+
+ if (priv->id == ID_MT7530) {
+- priv->ethernet = syscon_node_to_regmap(dn);
+- if (IS_ERR(priv->ethernet))
+- return PTR_ERR(priv->ethernet);
+-
+ regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
+ ret = regulator_enable(priv->core_pwr);
+ if (ret < 0) {
+@@ -1426,14 +1349,6 @@ static void mt7530_phylink_mac_config(st
+ /* Setup TX circuit incluing relevant PAD and driving */
+ mt7530_pad_clk_setup(ds, state->interface);
+
+- if (priv->id == ID_MT7530) {
+- /* Setup RX circuit, relevant PAD and driving on the
+- * host which must be placed after the setup on the
+- * device side is all finished.
+- */
+- mt7623_pad_clk_setup(ds);
+- }
+-
+ priv->p6_interface = state->interface;
+ break;
+ default:
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -275,7 +275,6 @@ enum mt7530_vlan_port_attr {
+
+ /* Registers for TRGMII on the both side */
+ #define MT7530_TRGMII_RCK_CTRL 0x7a00
+-#define GSW_TRGMII_RCK_CTRL 0x300
+ #define RX_RST BIT(31)
+ #define RXC_DQSISEL BIT(30)
+ #define DQSI1_TAP_MASK (0x7f << 8)
+@@ -284,31 +283,24 @@ enum mt7530_vlan_port_attr {
+ #define DQSI0_TAP(x) ((x) & 0x7f)
+
+ #define MT7530_TRGMII_RCK_RTT 0x7a04
+-#define GSW_TRGMII_RCK_RTT 0x304
+ #define DQS1_GATE BIT(31)
+ #define DQS0_GATE BIT(30)
+
+ #define MT7530_TRGMII_RD(x) (0x7a10 + (x) * 8)
+-#define GSW_TRGMII_RD(x) (0x310 + (x) * 8)
+ #define BSLIP_EN BIT(31)
+ #define EDGE_CHK BIT(30)
+ #define RD_TAP_MASK 0x7f
+ #define RD_TAP(x) ((x) & 0x7f)
+
+-#define GSW_TRGMII_TXCTRL 0x340
+ #define MT7530_TRGMII_TXCTRL 0x7a40
+ #define TRAIN_TXEN BIT(31)
+ #define TXC_INV BIT(30)
+ #define TX_RST BIT(28)
+
+ #define MT7530_TRGMII_TD_ODT(i) (0x7a54 + 8 * (i))
+-#define GSW_TRGMII_TD_ODT(i) (0x354 + 8 * (i))
+ #define TD_DM_DRVP(x) ((x) & 0xf)
+ #define TD_DM_DRVN(x) (((x) & 0xf) << 4)
+
+-#define GSW_INTF_MODE 0x390
+-#define INTF_MODE_TRGMII BIT(1)
+-
+ #define MT7530_TRGMII_TCK_CTRL 0x7a78
+ #define TCK_TAP(x) (((x) & 0xf) << 8)
+
+@@ -441,7 +433,6 @@ static const char *p5_intf_modes(unsigne
+ * @ds: The pointer to the dsa core structure
+ * @bus: The bus used for the device and built-in PHY
+ * @rstc: The pointer to reset control used by MCM
+- * @ethernet: The regmap used for access TRGMII-based registers
+ * @core_pwr: The power supplied into the core
+ * @io_pwr: The power supplied into the I/O
+ * @reset: The descriptor for GPIO line tied to its reset pin
+@@ -458,7 +449,6 @@ struct mt7530_priv {
+ struct dsa_switch *ds;
+ struct mii_bus *bus;
+ struct reset_control *rstc;
+- struct regmap *ethernet;
+ struct regulator *core_pwr;
+ struct regulator *io_pwr;
+ struct gpio_desc *reset;
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: "René van Dorst" <opensource@vdorst.com>
+Date: Mon, 6 Apr 2020 05:42:54 +0800
+Subject: net: ethernet: mediatek: move mt7623 settings out off the mt7530
+
+From: "René van Dorst" <opensource@vdorst.com>
+
+[ Upstream commit a5d75538295b06bc6ade1b9da07b9bee57d1c677 ]
+
+Moving mt7623 logic out off mt7530, is required to make hardware setting
+consistent after we introduce phylink to mtk driver.
+
+Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
+Reviewed-by: Sean Wang <sean.wang@mediatek.com>
+Tested-by: Sean Wang <sean.wang@mediatek.com>
+Signed-off-by: René van Dorst <opensource@vdorst.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 24 +++++++++++++++++++++++-
+ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 ++++++++
+ 2 files changed, 31 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -65,6 +65,17 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
+ return __raw_readl(eth->base + reg);
+ }
+
++u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg)
++{
++ u32 val;
++
++ val = mtk_r32(eth, reg);
++ val &= ~mask;
++ val |= set;
++ mtk_w32(eth, val, reg);
++ return reg;
++}
++
+ static int mtk_mdio_busy_wait(struct mtk_eth *eth)
+ {
+ unsigned long t_start = jiffies;
+@@ -193,7 +204,7 @@ static void mtk_mac_config(struct phylin
+ struct mtk_mac *mac = container_of(config, struct mtk_mac,
+ phylink_config);
+ struct mtk_eth *eth = mac->hw;
+- u32 mcr_cur, mcr_new, sid;
++ u32 mcr_cur, mcr_new, sid, i;
+ int val, ge_mode, err;
+
+ /* MT76x8 has no hardware settings between for the MAC */
+@@ -255,6 +266,17 @@ static void mtk_mac_config(struct phylin
+ PHY_INTERFACE_MODE_TRGMII)
+ mtk_gmac0_rgmii_adjust(mac->hw,
+ state->speed);
++
++ /* mt7623_pad_clk_setup */
++ for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
++ mtk_w32(mac->hw,
++ TD_DM_DRVP(8) | TD_DM_DRVN(8),
++ TRGMII_TD_ODT(i));
++
++ /* Assert/release MT7623 RXC reset */
++ mtk_m32(mac->hw, 0, RXC_RST | RXC_DQSISEL,
++ TRGMII_RCK_CTRL);
++ mtk_m32(mac->hw, RXC_RST, 0, TRGMII_RCK_CTRL);
+ }
+ }
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+@@ -352,10 +352,13 @@
+ #define DQSI0(x) ((x << 0) & GENMASK(6, 0))
+ #define DQSI1(x) ((x << 8) & GENMASK(14, 8))
+ #define RXCTL_DMWTLAT(x) ((x << 16) & GENMASK(18, 16))
++#define RXC_RST BIT(31)
+ #define RXC_DQSISEL BIT(30)
+ #define RCK_CTRL_RGMII_1000 (RXC_DQSISEL | RXCTL_DMWTLAT(2) | DQSI1(16))
+ #define RCK_CTRL_RGMII_10_100 RXCTL_DMWTLAT(2)
+
++#define NUM_TRGMII_CTRL 5
++
+ /* TRGMII RXC control register */
+ #define TRGMII_TCK_CTRL 0x10340
+ #define TXCTL_DMWTLAT(x) ((x << 16) & GENMASK(18, 16))
+@@ -363,6 +366,11 @@
+ #define TCK_CTRL_RGMII_1000 TXCTL_DMWTLAT(2)
+ #define TCK_CTRL_RGMII_10_100 (TXC_INV | TXCTL_DMWTLAT(2))
+
++/* TRGMII TX Drive Strength */
++#define TRGMII_TD_ODT(i) (0x10354 + 8 * (i))
++#define TD_DM_DRVP(x) ((x) & 0xf)
++#define TD_DM_DRVN(x) (((x) & 0xf) << 4)
++
+ /* TRGMII Interface mode register */
+ #define INTF_MODE 0x10390
+ #define TRGMII_INTF_DIS BIT(0)
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Tim Stallard <code@timstallard.me.uk>
+Date: Fri, 3 Apr 2020 21:22:57 +0100
+Subject: net: icmp6: do not select saddr from iif when route has prefsrc set
+
+From: Tim Stallard <code@timstallard.me.uk>
+
+[ Upstream commit b93cfb9cd3af3adc9ba4854f178d5300f7544d3e ]
+
+Since commit fac6fce9bdb5 ("net: icmp6: provide input address for
+traceroute6") ICMPv6 errors have source addresses from the ingress
+interface. However, this overrides when source address selection is
+influenced by setting preferred source addresses on routes.
+
+This can result in ICMP errors being lost to upstream BCP38 filters
+when the wrong source addresses are used, breaking path MTU discovery
+and traceroute.
+
+This patch sets the modified source address selection to only take place
+when the route used has no prefsrc set.
+
+It can be tested with:
+
+ip link add v1 type veth peer name v2
+ip netns add test
+ip netns exec test ip link set lo up
+ip link set v2 netns test
+ip link set v1 up
+ip netns exec test ip link set v2 up
+ip addr add 2001:db8::1/64 dev v1 nodad
+ip addr add 2001:db8::3 dev v1 nodad
+ip netns exec test ip addr add 2001:db8::2/64 dev v2 nodad
+ip netns exec test ip route add unreachable 2001:db8:1::1
+ip netns exec test ip addr add 2001:db8:100::1 dev lo
+ip netns exec test ip route add 2001:db8::1 dev v2 src 2001:db8:100::1
+ip route add 2001:db8:1000::1 via 2001:db8::2
+traceroute6 -s 2001:db8::1 2001:db8:1000::1
+traceroute6 -s 2001:db8::3 2001:db8:1000::1
+ip netns delete test
+
+Output before:
+$ traceroute6 -s 2001:db8::1 2001:db8:1000::1
+traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
+ 1 2001:db8::2 (2001:db8::2) 0.843 ms !N 0.396 ms !N 0.257 ms !N
+$ traceroute6 -s 2001:db8::3 2001:db8:1000::1
+traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
+ 1 2001:db8::2 (2001:db8::2) 0.772 ms !N 0.257 ms !N 0.357 ms !N
+
+After:
+$ traceroute6 -s 2001:db8::1 2001:db8:1000::1
+traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
+ 1 2001:db8:100::1 (2001:db8:100::1) 8.885 ms !N 0.310 ms !N 0.174 ms !N
+$ traceroute6 -s 2001:db8::3 2001:db8:1000::1
+traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
+ 1 2001:db8::2 (2001:db8::2) 1.403 ms !N 0.205 ms !N 0.313 ms !N
+
+Fixes: fac6fce9bdb5 ("net: icmp6: provide input address for traceroute6")
+Signed-off-by: Tim Stallard <code@timstallard.me.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv6/icmp.c | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+--- a/net/ipv6/icmp.c
++++ b/net/ipv6/icmp.c
+@@ -229,6 +229,25 @@ static bool icmpv6_xrlim_allow(struct so
+ return res;
+ }
+
++static bool icmpv6_rt_has_prefsrc(struct sock *sk, u8 type,
++ struct flowi6 *fl6)
++{
++ struct net *net = sock_net(sk);
++ struct dst_entry *dst;
++ bool res = false;
++
++ dst = ip6_route_output(net, sk, fl6);
++ if (!dst->error) {
++ struct rt6_info *rt = (struct rt6_info *)dst;
++ struct in6_addr prefsrc;
++
++ rt6_get_prefsrc(rt, &prefsrc);
++ res = !ipv6_addr_any(&prefsrc);
++ }
++ dst_release(dst);
++ return res;
++}
++
+ /*
+ * an inline helper for the "simple" if statement below
+ * checks if parameter problem report is caused by an
+@@ -527,7 +546,7 @@ static void icmp6_send(struct sk_buff *s
+ saddr = force_saddr;
+ if (saddr) {
+ fl6.saddr = *saddr;
+- } else {
++ } else if (!icmpv6_rt_has_prefsrc(sk, type, &fl6)) {
+ /* select a more meaningful saddr from input if */
+ struct net_device *in_netdev;
+
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Taras Chornyi <taras.chornyi@plvision.eu>
+Date: Thu, 9 Apr 2020 20:25:24 +0300
+Subject: net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
+
+From: Taras Chornyi <taras.chornyi@plvision.eu>
+
+[ Upstream commit 690cc86321eb9bcee371710252742fb16fe96824 ]
+
+When CONFIG_IP_MULTICAST is not set and multicast ip is added to the device
+with autojoin flag or when multicast ip is deleted kernel will crash.
+
+steps to reproduce:
+
+ip addr add 224.0.0.0/32 dev eth0
+ip addr del 224.0.0.0/32 dev eth0
+
+or
+
+ip addr add 224.0.0.0/32 dev eth0 autojoin
+
+Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088
+ pc : _raw_write_lock_irqsave+0x1e0/0x2ac
+ lr : lock_sock_nested+0x1c/0x60
+ Call trace:
+ _raw_write_lock_irqsave+0x1e0/0x2ac
+ lock_sock_nested+0x1c/0x60
+ ip_mc_config.isra.28+0x50/0xe0
+ inet_rtm_deladdr+0x1a8/0x1f0
+ rtnetlink_rcv_msg+0x120/0x350
+ netlink_rcv_skb+0x58/0x120
+ rtnetlink_rcv+0x14/0x20
+ netlink_unicast+0x1b8/0x270
+ netlink_sendmsg+0x1a0/0x3b0
+ ____sys_sendmsg+0x248/0x290
+ ___sys_sendmsg+0x80/0xc0
+ __sys_sendmsg+0x68/0xc0
+ __arm64_sys_sendmsg+0x20/0x30
+ el0_svc_common.constprop.2+0x88/0x150
+ do_el0_svc+0x20/0x80
+ el0_sync_handler+0x118/0x190
+ el0_sync+0x140/0x180
+
+Fixes: 93a714d6b53d ("multicast: Extend ip address command to enable multicast group join/leave on")
+Signed-off-by: Taras Chornyi <taras.chornyi@plvision.eu>
+Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/devinet.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/net/ipv4/devinet.c
++++ b/net/ipv4/devinet.c
+@@ -614,12 +614,15 @@ struct in_ifaddr *inet_ifa_byprefix(stru
+ return NULL;
+ }
+
+-static int ip_mc_config(struct sock *sk, bool join, const struct in_ifaddr *ifa)
++static int ip_mc_autojoin_config(struct net *net, bool join,
++ const struct in_ifaddr *ifa)
+ {
++#if defined(CONFIG_IP_MULTICAST)
+ struct ip_mreqn mreq = {
+ .imr_multiaddr.s_addr = ifa->ifa_address,
+ .imr_ifindex = ifa->ifa_dev->dev->ifindex,
+ };
++ struct sock *sk = net->ipv4.mc_autojoin_sk;
+ int ret;
+
+ ASSERT_RTNL();
+@@ -632,6 +635,9 @@ static int ip_mc_config(struct sock *sk,
+ release_sock(sk);
+
+ return ret;
++#else
++ return -EOPNOTSUPP;
++#endif
+ }
+
+ static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,
+@@ -675,7 +681,7 @@ static int inet_rtm_deladdr(struct sk_bu
+ continue;
+
+ if (ipv4_is_multicast(ifa->ifa_address))
+- ip_mc_config(net->ipv4.mc_autojoin_sk, false, ifa);
++ ip_mc_autojoin_config(net, false, ifa);
+ __inet_del_ifa(in_dev, ifap, 1, nlh, NETLINK_CB(skb).portid);
+ return 0;
+ }
+@@ -940,8 +946,7 @@ static int inet_rtm_newaddr(struct sk_bu
+ */
+ set_ifa_lifetime(ifa, valid_lft, prefered_lft);
+ if (ifa->ifa_flags & IFA_F_MCAUTOJOIN) {
+- int ret = ip_mc_config(net->ipv4.mc_autojoin_sk,
+- true, ifa);
++ int ret = ip_mc_autojoin_config(net, true, ifa);
+
+ if (ret < 0) {
+ inet_free_ifa(ifa);
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Tim Stallard <code@timstallard.me.uk>
+Date: Fri, 3 Apr 2020 21:26:21 +0100
+Subject: net: ipv6: do not consider routes via gateways for anycast address check
+
+From: Tim Stallard <code@timstallard.me.uk>
+
+[ Upstream commit 03e2a984b6165621f287fadf5f4b5cd8b58dcaba ]
+
+The behaviour for what is considered an anycast address changed in
+commit 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after
+encountering pmtu exception"). This now considers the first
+address in a subnet where there is a route via a gateway
+to be an anycast address.
+
+This breaks path MTU discovery and traceroutes when a host in a
+remote network uses the address at the start of a prefix
+(eg 2600:: advertised as 2600::/48 in the DFZ) as ICMP errors
+will not be sent to anycast addresses.
+
+This patch excludes any routes with a gateway, or via point to
+point links, like the behaviour previously from
+rt6_is_gw_or_nonexthop in net/ipv6/route.c.
+
+This can be tested with:
+ip link add v1 type veth peer name v2
+ip netns add test
+ip netns exec test ip link set lo up
+ip link set v2 netns test
+ip link set v1 up
+ip netns exec test ip link set v2 up
+ip addr add 2001:db8::1/64 dev v1 nodad
+ip addr add 2001:db8:100:: dev lo nodad
+ip netns exec test ip addr add 2001:db8::2/64 dev v2 nodad
+ip netns exec test ip route add unreachable 2001:db8:1::1
+ip netns exec test ip route add 2001:db8:100::/64 via 2001:db8::1
+ip netns exec test sysctl net.ipv6.conf.all.forwarding=1
+ip route add 2001:db8:1::1 via 2001:db8::2
+ping -I 2001:db8::1 2001:db8:1::1 -c1
+ping -I 2001:db8:100:: 2001:db8:1::1 -c1
+ip addr delete 2001:db8:100:: dev lo
+ip netns delete test
+
+Currently the first ping will get back a destination unreachable ICMP
+error, but the second will never get a response, with "icmp6_send:
+acast source" logged. After this patch, both get destination
+unreachable ICMP replies.
+
+Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
+Signed-off-by: Tim Stallard <code@timstallard.me.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/ip6_route.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/net/ip6_route.h
++++ b/include/net/ip6_route.h
+@@ -254,6 +254,7 @@ static inline bool ipv6_anycast_destinat
+
+ return rt->rt6i_flags & RTF_ANYCAST ||
+ (rt->rt6i_dst.plen < 127 &&
++ !(rt->rt6i_flags & (RTF_GATEWAY | RTF_NONEXTHOP)) &&
+ ipv6_addr_equal(&rt->rt6i_dst.addr, daddr));
+ }
+
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Moshe Shemesh <moshe@mellanox.com>
+Date: Mon, 30 Mar 2020 10:21:49 +0300
+Subject: net/mlx5: Fix frequent ioread PCI access during recovery
+
+From: Moshe Shemesh <moshe@mellanox.com>
+
+[ Upstream commit 8c702a53bb0a79bfa203ba21ef1caba43673c5b7 ]
+
+High frequency of PCI ioread calls during recovery flow may cause the
+following trace on powerpc:
+
+[ 248.670288] EEH: 2100000 reads ignored for recovering device at
+location=Slot1 driver=mlx5_core pci addr=0000:01:00.1
+[ 248.670331] EEH: Might be infinite loop in mlx5_core driver
+[ 248.670361] CPU: 2 PID: 35247 Comm: kworker/u192:11 Kdump: loaded
+Tainted: G OE ------------ 4.14.0-115.14.1.el7a.ppc64le #1
+[ 248.670425] Workqueue: mlx5_health0000:01:00.1 health_recover_work
+[mlx5_core]
+[ 248.670471] Call Trace:
+[ 248.670492] [c00020391c11b960] [c000000000c217ac] dump_stack+0xb0/0xf4
+(unreliable)
+[ 248.670548] [c00020391c11b9a0] [c000000000045818]
+eeh_check_failure+0x5c8/0x630
+[ 248.670631] [c00020391c11ba50] [c00000000068fce4]
+ioread32be+0x114/0x1c0
+[ 248.670692] [c00020391c11bac0] [c00800000dd8b400]
+mlx5_error_sw_reset+0x160/0x510 [mlx5_core]
+[ 248.670752] [c00020391c11bb60] [c00800000dd75824]
+mlx5_disable_device+0x34/0x1d0 [mlx5_core]
+[ 248.670822] [c00020391c11bbe0] [c00800000dd8affc]
+health_recover_work+0x11c/0x3c0 [mlx5_core]
+[ 248.670891] [c00020391c11bc80] [c000000000164fcc]
+process_one_work+0x1bc/0x5f0
+[ 248.670955] [c00020391c11bd20] [c000000000167f8c]
+worker_thread+0xac/0x6b0
+[ 248.671015] [c00020391c11bdc0] [c000000000171618] kthread+0x168/0x1b0
+[ 248.671067] [c00020391c11be30] [c00000000000b65c]
+ret_from_kernel_thread+0x5c/0x80
+
+Reduce the PCI ioread frequency during recovery by using msleep()
+instead of cond_resched()
+
+Fixes: 3e5b72ac2f29 ("net/mlx5: Issue SW reset on FW assert")
+Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
+Reviewed-by: Feras Daoud <ferasda@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
+@@ -243,7 +243,7 @@ recover_from_sw_reset:
+ if (mlx5_get_nic_state(dev) == MLX5_NIC_IFC_DISABLED)
+ break;
+
+- cond_resched();
++ msleep(20);
+ } while (!time_after(jiffies, end));
+
+ if (mlx5_get_nic_state(dev) != MLX5_NIC_IFC_DISABLED) {
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Eran Ben Elisha <eranbe@mellanox.com>
+Date: Tue, 24 Mar 2020 15:04:26 +0200
+Subject: net/mlx5e: Add missing release firmware call
+
+From: Eran Ben Elisha <eranbe@mellanox.com>
+
+[ Upstream commit d19987ccf57501894fdd8fadc2e55e4a3dd57239 ]
+
+Once driver finishes flashing the firmware image, it should release it.
+
+Fixes: 9c8bca2637b8 ("mlx5: Move firmware flash implementation to devlink")
+Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
+Reviewed-by: Aya Levin <ayal@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+@@ -23,7 +23,10 @@ static int mlx5_devlink_flash_update(str
+ if (err)
+ return err;
+
+- return mlx5_firmware_flash(dev, fw, extack);
++ err = mlx5_firmware_flash(dev, fw, extack);
++ release_firmware(fw);
++
++ return err;
+ }
+
+ static u8 mlx5_fw_ver_major(u32 version)
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Dmytro Linkin <dmitrolin@mellanox.com>
+Date: Wed, 1 Apr 2020 14:41:27 +0300
+Subject: net/mlx5e: Fix nest_level for vlan pop action
+
+From: Dmytro Linkin <dmitrolin@mellanox.com>
+
+[ Upstream commit 70f478ca085deec4d6c1f187f773f5827ddce7e8 ]
+
+Current value of nest_level, assigned from net_device lower_level value,
+does not reflect the actual number of vlan headers, needed to pop.
+For ex., if we have untagged ingress traffic sended over vlan devices,
+instead of one pop action, driver will perform two pop actions.
+To fix that, calculate nest_level as difference between vlan device and
+parent device lower_levels.
+
+Fixes: f3b0a18bb6cb ("net: remove unnecessary variables and callback")
+Signed-off-by: Dmytro Linkin <dmitrolin@mellanox.com>
+Signed-off-by: Roi Dayan <roid@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+@@ -3221,12 +3221,13 @@ static int add_vlan_pop_action(struct ml
+ struct mlx5_esw_flow_attr *attr,
+ u32 *action)
+ {
+- int nest_level = attr->parse_attr->filter_dev->lower_level;
+ struct flow_action_entry vlan_act = {
+ .id = FLOW_ACTION_VLAN_POP,
+ };
+- int err = 0;
++ int nest_level, err = 0;
+
++ nest_level = attr->parse_attr->filter_dev->lower_level -
++ priv->netdev->lower_level;
+ while (nest_level--) {
+ err = parse_tc_vlan_action(priv, &vlan_act, attr, action);
+ if (err)
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Parav Pandit <parav@mellanox.com>
+Date: Fri, 3 Apr 2020 03:57:30 -0500
+Subject: net/mlx5e: Fix pfnum in devlink port attribute
+
+From: Parav Pandit <parav@mellanox.com>
+
+[ Upstream commit 7482d9cb5b974b7ad1a58fa8714f7a8c05b5d278 ]
+
+Cited patch missed to extract PCI pf number accurately for PF and VF
+port flavour. It considered PCI device + function number.
+Due to this, device having non zero device number shown large pfnum.
+
+Hence, use only PCI function number; to avoid similar errors, derive
+pfnum one time for all port flavours.
+
+Fixes: f60f315d339e ("net/mlx5e: Register devlink ports for physical link, PCI PF, VFs")
+Reviewed-by: Jiri Pirko <jiri@mellanox.com>
+Signed-off-by: Parav Pandit <parav@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+@@ -1854,29 +1854,30 @@ static int register_devlink_port(struct
+ struct mlx5_eswitch_rep *rep = rpriv->rep;
+ struct netdev_phys_item_id ppid = {};
+ unsigned int dl_port_index = 0;
++ u16 pfnum;
+
+ if (!is_devlink_port_supported(dev, rpriv))
+ return 0;
+
+ mlx5e_rep_get_port_parent_id(rpriv->netdev, &ppid);
++ pfnum = PCI_FUNC(dev->pdev->devfn);
+
+ if (rep->vport == MLX5_VPORT_UPLINK) {
+ devlink_port_attrs_set(&rpriv->dl_port,
+ DEVLINK_PORT_FLAVOUR_PHYSICAL,
+- PCI_FUNC(dev->pdev->devfn), false, 0,
++ pfnum, false, 0,
+ &ppid.id[0], ppid.id_len);
+ dl_port_index = vport_to_devlink_port_index(dev, rep->vport);
+ } else if (rep->vport == MLX5_VPORT_PF) {
+ devlink_port_attrs_pci_pf_set(&rpriv->dl_port,
+ &ppid.id[0], ppid.id_len,
+- dev->pdev->devfn);
++ pfnum);
+ dl_port_index = rep->vport;
+ } else if (mlx5_eswitch_is_vf_vport(dev->priv.eswitch,
+ rpriv->rep->vport)) {
+ devlink_port_attrs_pci_vf_set(&rpriv->dl_port,
+ &ppid.id[0], ppid.id_len,
+- dev->pdev->devfn,
+- rep->vport - 1);
++ pfnum, rep->vport - 1);
+ dl_port_index = vport_to_devlink_port_index(dev, rep->vport);
+ }
+
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Vladimir Oltean <vladimir.oltean@nxp.com>
+Date: Tue, 14 Apr 2020 22:36:15 +0300
+Subject: net: mscc: ocelot: fix untagged packet drops when enslaving to vlan aware bridge
+
+From: Vladimir Oltean <vladimir.oltean@nxp.com>
+
+[ Upstream commit 87b0f983f66f23762921129fd35966eddc3f2dae ]
+
+To rehash a previous explanation given in commit 1c44ce560b4d ("net:
+mscc: ocelot: fix vlan_filtering when enslaving to bridge before link is
+up"), the switch driver operates the in a mode where a single VLAN can
+be transmitted as untagged on a particular egress port. That is the
+"native VLAN on trunk port" use case.
+
+The configuration for this native VLAN is driven in 2 ways:
+ - Set the egress port rewriter to strip the VLAN tag for the native
+ VID (as it is egress-untagged, after all).
+ - Configure the ingress port to drop untagged and priority-tagged
+ traffic, if there is no native VLAN. The intention of this setting is
+ that a trunk port with no native VLAN should not accept untagged
+ traffic.
+
+Since both of the above configurations for the native VLAN should only
+be done if VLAN awareness is requested, they are actually done from the
+ocelot_port_vlan_filtering function, after the basic procedure of
+toggling the VLAN awareness flag of the port.
+
+But there's a problem with that simplistic approach: we are trying to
+juggle with 2 independent variables from a single function:
+ - Native VLAN of the port - its value is held in port->vid.
+ - VLAN awareness state of the port - currently there are some issues
+ here, more on that later*.
+The actual problem can be seen when enslaving the switch ports to a VLAN
+filtering bridge:
+ 0. The driver configures a pvid of zero for each port, when in
+ standalone mode. While the bridge configures a default_pvid of 1 for
+ each port that gets added as a slave to it.
+ 1. The bridge calls ocelot_port_vlan_filtering with vlan_aware=true.
+ The VLAN-filtering-dependent portion of the native VLAN
+ configuration is done, considering that the native VLAN is 0.
+ 2. The bridge calls ocelot_vlan_add with vid=1, pvid=true,
+ untagged=true. The native VLAN changes to 1 (change which gets
+ propagated to hardware).
+ 3. ??? - nobody calls ocelot_port_vlan_filtering again, to reapply the
+ VLAN-filtering-dependent portion of the native VLAN configuration,
+ for the new native VLAN of 1. One can notice that after toggling "ip
+ link set dev br0 type bridge vlan_filtering 0 && ip link set dev br0
+ type bridge vlan_filtering 1", the new native VLAN finally makes it
+ through and untagged traffic finally starts flowing again. But
+ obviously that shouldn't be needed.
+
+So it is clear that 2 independent variables need to both re-trigger the
+native VLAN configuration. So we introduce the second variable as
+ocelot_port->vlan_aware.
+
+*Actually both the DSA Felix driver and the Ocelot driver already had
+each its own variable:
+ - Ocelot: ocelot_port_private->vlan_aware
+ - Felix: dsa_port->vlan_filtering
+but the common Ocelot library needs to work with a single, common,
+variable, so there is some refactoring done to move the vlan_aware
+property from the private structure into the common ocelot_port
+structure.
+
+Fixes: 97bb69e1e36e ("net: mscc: ocelot: break apart ocelot_vlan_port_apply")
+Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
+Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/ocelot/felix.c | 5 --
+ drivers/net/ethernet/mscc/ocelot.c | 84 ++++++++++++++++++-------------------
+ drivers/net/ethernet/mscc/ocelot.h | 2
+ include/soc/mscc/ocelot.h | 4 +
+ 4 files changed, 47 insertions(+), 48 deletions(-)
+
+--- a/drivers/net/dsa/ocelot/felix.c
++++ b/drivers/net/dsa/ocelot/felix.c
+@@ -46,11 +46,8 @@ static int felix_fdb_add(struct dsa_swit
+ const unsigned char *addr, u16 vid)
+ {
+ struct ocelot *ocelot = ds->priv;
+- bool vlan_aware;
+
+- vlan_aware = dsa_port_is_vlan_filtering(dsa_to_port(ds, port));
+-
+- return ocelot_fdb_add(ocelot, port, addr, vid, vlan_aware);
++ return ocelot_fdb_add(ocelot, port, addr, vid);
+ }
+
+ static int felix_fdb_del(struct dsa_switch *ds, int port,
+--- a/drivers/net/ethernet/mscc/ocelot.c
++++ b/drivers/net/ethernet/mscc/ocelot.c
+@@ -183,44 +183,47 @@ static void ocelot_vlan_mode(struct ocel
+ ocelot_write(ocelot, val, ANA_VLANMASK);
+ }
+
+-void ocelot_port_vlan_filtering(struct ocelot *ocelot, int port,
+- bool vlan_aware)
++static int ocelot_port_set_native_vlan(struct ocelot *ocelot, int port,
++ u16 vid)
+ {
+ struct ocelot_port *ocelot_port = ocelot->ports[port];
+- u32 val;
++ u32 val = 0;
+
+- if (vlan_aware)
+- val = ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA |
+- ANA_PORT_VLAN_CFG_VLAN_POP_CNT(1);
+- else
+- val = 0;
+- ocelot_rmw_gix(ocelot, val,
+- ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA |
+- ANA_PORT_VLAN_CFG_VLAN_POP_CNT_M,
+- ANA_PORT_VLAN_CFG, port);
++ if (ocelot_port->vid != vid) {
++ /* Always permit deleting the native VLAN (vid = 0) */
++ if (ocelot_port->vid && vid) {
++ dev_err(ocelot->dev,
++ "Port already has a native VLAN: %d\n",
++ ocelot_port->vid);
++ return -EBUSY;
++ }
++ ocelot_port->vid = vid;
++ }
++
++ ocelot_rmw_gix(ocelot, REW_PORT_VLAN_CFG_PORT_VID(vid),
++ REW_PORT_VLAN_CFG_PORT_VID_M,
++ REW_PORT_VLAN_CFG, port);
+
+- if (vlan_aware && !ocelot_port->vid)
++ if (ocelot_port->vlan_aware && !ocelot_port->vid)
+ /* If port is vlan-aware and tagged, drop untagged and priority
+ * tagged frames.
+ */
+ val = ANA_PORT_DROP_CFG_DROP_UNTAGGED_ENA |
+ ANA_PORT_DROP_CFG_DROP_PRIO_S_TAGGED_ENA |
+ ANA_PORT_DROP_CFG_DROP_PRIO_C_TAGGED_ENA;
+- else
+- val = 0;
+ ocelot_rmw_gix(ocelot, val,
+ ANA_PORT_DROP_CFG_DROP_UNTAGGED_ENA |
+ ANA_PORT_DROP_CFG_DROP_PRIO_S_TAGGED_ENA |
+ ANA_PORT_DROP_CFG_DROP_PRIO_C_TAGGED_ENA,
+ ANA_PORT_DROP_CFG, port);
+
+- if (vlan_aware) {
++ if (ocelot_port->vlan_aware) {
+ if (ocelot_port->vid)
+ /* Tag all frames except when VID == DEFAULT_VLAN */
+- val |= REW_TAG_CFG_TAG_CFG(1);
++ val = REW_TAG_CFG_TAG_CFG(1);
+ else
+ /* Tag all frames */
+- val |= REW_TAG_CFG_TAG_CFG(3);
++ val = REW_TAG_CFG_TAG_CFG(3);
+ } else {
+ /* Port tagging disabled. */
+ val = REW_TAG_CFG_TAG_CFG(0);
+@@ -228,31 +231,31 @@ void ocelot_port_vlan_filtering(struct o
+ ocelot_rmw_gix(ocelot, val,
+ REW_TAG_CFG_TAG_CFG_M,
+ REW_TAG_CFG, port);
++
++ return 0;
+ }
+-EXPORT_SYMBOL(ocelot_port_vlan_filtering);
+
+-static int ocelot_port_set_native_vlan(struct ocelot *ocelot, int port,
+- u16 vid)
++void ocelot_port_vlan_filtering(struct ocelot *ocelot, int port,
++ bool vlan_aware)
+ {
+ struct ocelot_port *ocelot_port = ocelot->ports[port];
++ u32 val;
+
+- if (ocelot_port->vid != vid) {
+- /* Always permit deleting the native VLAN (vid = 0) */
+- if (ocelot_port->vid && vid) {
+- dev_err(ocelot->dev,
+- "Port already has a native VLAN: %d\n",
+- ocelot_port->vid);
+- return -EBUSY;
+- }
+- ocelot_port->vid = vid;
+- }
++ ocelot_port->vlan_aware = vlan_aware;
+
+- ocelot_rmw_gix(ocelot, REW_PORT_VLAN_CFG_PORT_VID(vid),
+- REW_PORT_VLAN_CFG_PORT_VID_M,
+- REW_PORT_VLAN_CFG, port);
++ if (vlan_aware)
++ val = ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA |
++ ANA_PORT_VLAN_CFG_VLAN_POP_CNT(1);
++ else
++ val = 0;
++ ocelot_rmw_gix(ocelot, val,
++ ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA |
++ ANA_PORT_VLAN_CFG_VLAN_POP_CNT_M,
++ ANA_PORT_VLAN_CFG, port);
+
+- return 0;
++ ocelot_port_set_native_vlan(ocelot, port, ocelot_port->vid);
+ }
++EXPORT_SYMBOL(ocelot_port_vlan_filtering);
+
+ /* Default vlan to clasify for untagged frames (may be zero) */
+ static void ocelot_port_set_pvid(struct ocelot *ocelot, int port, u16 pvid)
+@@ -857,12 +860,12 @@ static void ocelot_get_stats64(struct ne
+ }
+
+ int ocelot_fdb_add(struct ocelot *ocelot, int port,
+- const unsigned char *addr, u16 vid, bool vlan_aware)
++ const unsigned char *addr, u16 vid)
+ {
+ struct ocelot_port *ocelot_port = ocelot->ports[port];
+
+ if (!vid) {
+- if (!vlan_aware)
++ if (!ocelot_port->vlan_aware)
+ /* If the bridge is not VLAN aware and no VID was
+ * provided, set it to pvid to ensure the MAC entry
+ * matches incoming untagged packets
+@@ -889,7 +892,7 @@ static int ocelot_port_fdb_add(struct nd
+ struct ocelot *ocelot = priv->port.ocelot;
+ int port = priv->chip_port;
+
+- return ocelot_fdb_add(ocelot, port, addr, vid, priv->vlan_aware);
++ return ocelot_fdb_add(ocelot, port, addr, vid);
+ }
+
+ int ocelot_fdb_del(struct ocelot *ocelot, int port,
+@@ -1488,8 +1491,8 @@ static int ocelot_port_attr_set(struct n
+ ocelot_port_attr_ageing_set(ocelot, port, attr->u.ageing_time);
+ break;
+ case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING:
+- priv->vlan_aware = attr->u.vlan_filtering;
+- ocelot_port_vlan_filtering(ocelot, port, priv->vlan_aware);
++ ocelot_port_vlan_filtering(ocelot, port,
++ attr->u.vlan_filtering);
+ break;
+ case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED:
+ ocelot_port_attr_mc_set(ocelot, port, !attr->u.mc_disabled);
+@@ -1860,7 +1863,6 @@ static int ocelot_netdevice_port_event(s
+ } else {
+ err = ocelot_port_bridge_leave(ocelot, port,
+ info->upper_dev);
+- priv->vlan_aware = false;
+ }
+ }
+ if (netif_is_lag_master(info->upper_dev)) {
+--- a/drivers/net/ethernet/mscc/ocelot.h
++++ b/drivers/net/ethernet/mscc/ocelot.h
+@@ -66,8 +66,6 @@ struct ocelot_port_private {
+ struct phy_device *phy;
+ u8 chip_port;
+
+- u8 vlan_aware;
+-
+ phy_interface_t phy_mode;
+ struct phy *serdes;
+
+--- a/include/soc/mscc/ocelot.h
++++ b/include/soc/mscc/ocelot.h
+@@ -411,6 +411,8 @@ struct ocelot_port {
+
+ void __iomem *regs;
+
++ bool vlan_aware;
++
+ /* Ingress default VLAN (pvid) */
+ u16 pvid;
+
+@@ -527,7 +529,7 @@ int ocelot_port_bridge_leave(struct ocel
+ int ocelot_fdb_dump(struct ocelot *ocelot, int port,
+ dsa_fdb_dump_cb_t *cb, void *data);
+ int ocelot_fdb_add(struct ocelot *ocelot, int port,
+- const unsigned char *addr, u16 vid, bool vlan_aware);
++ const unsigned char *addr, u16 vid);
+ int ocelot_fdb_del(struct ocelot *ocelot, int port,
+ const unsigned char *addr, u16 vid);
+ int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid,
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
+Date: Fri, 10 Apr 2020 12:16:16 +0900
+Subject: net: phy: micrel: use genphy_read_status for KSZ9131
+
+From: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
+
+[ Upstream commit 68dac3eb50be32957ae6e1e6da9281a3b7c6658b ]
+
+KSZ9131 will not work with some switches due to workaround for KSZ9031
+introduced in commit d2fd719bcb0e83cb39cfee22ee800f98a56eceb3
+("net/phy: micrel: Add workaround for bad autoneg").
+Use genphy_read_status instead of dedicated ksz9031_read_status.
+
+Fixes: bff5b4b37372 ("net: phy: micrel: add Microchip KSZ9131 initial driver")
+Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/phy/micrel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/phy/micrel.c
++++ b/drivers/net/phy/micrel.c
+@@ -1154,7 +1154,7 @@ static struct phy_driver ksphy_driver[]
+ .driver_data = &ksz9021_type,
+ .probe = kszphy_probe,
+ .config_init = ksz9131_config_init,
+- .read_status = ksz9031_read_status,
++ .read_status = genphy_read_status,
+ .ack_interrupt = kszphy_ack_interrupt,
+ .config_intr = kszphy_config_intr,
+ .get_sset_count = kszphy_get_sset_count,
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Wang Wenhu <wenhu.wang@vivo.com>
+Date: Wed, 8 Apr 2020 19:53:53 -0700
+Subject: net: qrtr: send msgs from local of same id as broadcast
+
+From: Wang Wenhu <wenhu.wang@vivo.com>
+
+[ Upstream commit 6dbf02acef69b0742c238574583b3068afbd227c ]
+
+If the local node id(qrtr_local_nid) is not modified after its
+initialization, it equals to the broadcast node id(QRTR_NODE_BCAST).
+So the messages from local node should not be taken as broadcast
+and keep the process going to send them out anyway.
+
+The definitions are as follow:
+static unsigned int qrtr_local_nid = NUMA_NO_NODE;
+
+Fixes: fdf5fd397566 ("net: qrtr: Broadcast messages only from control port")
+Signed-off-by: Wang Wenhu <wenhu.wang@vivo.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/qrtr/qrtr.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/net/qrtr/qrtr.c
++++ b/net/qrtr/qrtr.c
+@@ -763,20 +763,21 @@ static int qrtr_sendmsg(struct socket *s
+
+ node = NULL;
+ if (addr->sq_node == QRTR_NODE_BCAST) {
+- enqueue_fn = qrtr_bcast_enqueue;
+- if (addr->sq_port != QRTR_PORT_CTRL) {
++ if (addr->sq_port != QRTR_PORT_CTRL &&
++ qrtr_local_nid != QRTR_NODE_BCAST) {
+ release_sock(sk);
+ return -ENOTCONN;
+ }
++ enqueue_fn = qrtr_bcast_enqueue;
+ } else if (addr->sq_node == ipc->us.sq_node) {
+ enqueue_fn = qrtr_local_enqueue;
+ } else {
+- enqueue_fn = qrtr_node_enqueue;
+ node = qrtr_node_lookup(addr->sq_node);
+ if (!node) {
+ release_sock(sk);
+ return -ECONNRESET;
+ }
++ enqueue_fn = qrtr_node_enqueue;
+ }
+
+ plen = (len + 3) & ~3;
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Date: Mon, 6 Apr 2020 14:39:32 +0300
+Subject: net: revert default NAPI poll timeout to 2 jiffies
+
+From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+
+[ Upstream commit a4837980fd9fa4c70a821d11831698901baef56b ]
+
+For HZ < 1000 timeout 2000us rounds up to 1 jiffy but expires randomly
+because next timer interrupt could come shortly after starting softirq.
+
+For commonly used CONFIG_HZ=1000 nothing changes.
+
+Fixes: 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning")
+Reported-by: Dmitry Yakunin <zeil@yandex-team.ru>
+Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/dev.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -4090,7 +4090,8 @@ EXPORT_SYMBOL(netdev_max_backlog);
+
+ int netdev_tstamp_prequeue __read_mostly = 1;
+ int netdev_budget __read_mostly = 300;
+-unsigned int __read_mostly netdev_budget_usecs = 2000;
++/* Must be at least 2 jiffes to guarantee 1 jiffy timeout */
++unsigned int __read_mostly netdev_budget_usecs = 2 * USEC_PER_SEC / HZ;
+ int weight_p __read_mostly = 64; /* old backlog weight */
+ int dev_weight_rx_bias __read_mostly = 1; /* bias for backlog weight */
+ int dev_weight_tx_bias __read_mostly = 1; /* bias for output_queue quota */
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Tue, 14 Apr 2020 15:39:52 -0700
+Subject: net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes
+
+From: Florian Fainelli <f.fainelli@gmail.com>
+
+[ Upstream commit 806fd188ce2a4f8b587e83e73c478e6484fbfa55 ]
+
+After commit bfcb813203e619a8960a819bf533ad2a108d8105 ("net: dsa:
+configure the MTU for switch ports") my Lamobo R1 platform which uses
+an allwinner,sun7i-a20-gmac compatible Ethernet MAC started to fail
+by rejecting a MTU of 1536. The reason for that is that the DMA
+capabilities are not readable on this version of the IP, and there
+is also no 'tx-fifo-depth' property being provided in Device Tree. The
+property is documented as optional, and is not provided.
+
+Chen-Yu indicated that the FIFO sizes are 4KB for TX and 16KB for RX, so
+provide these values through platform data as an immediate fix until
+various Device Tree sources get updated accordingly.
+
+Fixes: eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values")
+Suggested-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Acked-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+@@ -150,6 +150,8 @@ static int sun7i_gmac_probe(struct platf
+ plat_dat->init = sun7i_gmac_init;
+ plat_dat->exit = sun7i_gmac_exit;
+ plat_dat->fix_mac_speed = sun7i_fix_speed;
++ plat_dat->tx_fifo_size = 4096;
++ plat_dat->rx_fifo_size = 16384;
+
+ ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv);
+ if (ret)
--- /dev/null
+From foo@baz Sat 18 Apr 2020 11:06:37 AM CEST
+From: Gilberto Bertin <me@jibi.io>
+Date: Fri, 10 Apr 2020 18:20:59 +0200
+Subject: net: tun: record RX queue in skb before do_xdp_generic()
+
+From: Gilberto Bertin <me@jibi.io>
+
+[ Upstream commit 3fe260e00cd0bf0be853c48fcc1e19853df615bb ]
+
+This allows netif_receive_generic_xdp() to correctly determine the RX
+queue from which the skb is coming, so that the context passed to the
+XDP program will contain the correct RX queue index.
+
+Signed-off-by: Gilberto Bertin <me@jibi.io>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/tun.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/tun.c
++++ b/drivers/net/tun.c
+@@ -1925,6 +1925,7 @@ drop:
+
+ skb_reset_network_header(skb);
+ skb_probe_transport_header(skb);
++ skb_record_rx_queue(skb, tfile->queue_index);
+
+ if (skb_xdp) {
+ struct bpf_prog *xdp_prog;
+@@ -2498,6 +2499,7 @@ build:
+ skb->protocol = eth_type_trans(skb, tun->dev);
+ skb_reset_network_header(skb);
+ skb_probe_transport_header(skb);
++ skb_record_rx_queue(skb, tfile->queue_index);
+
+ if (skb_xdp) {
+ err = do_xdp_generic(xdp_prog, skb);
+@@ -2509,7 +2511,6 @@ build:
+ !tfile->detached)
+ rxhash = __skb_get_hash_symmetric(skb);
+
+- skb_record_rx_queue(skb, tfile->queue_index);
+ netif_receive_skb(skb);
+
+ /* No need for get_cpu_ptr() here since this function is
--- /dev/null
+amd-xgbe-use-__napi_schedule-in-bh-context.patch
+hsr-check-protocol-version-in-hsr_newlink.patch
+l2tp-allow-management-of-tunnels-and-session-in-user-namespace.patch
+net-dsa-mt7530-fix-tagged-frames-pass-through-in-vlan-unaware-mode.patch
+net-ipv4-devinet-fix-crash-when-add-del-multicast-ip-with-autojoin.patch
+net-ipv6-do-not-consider-routes-via-gateways-for-anycast-address-check.patch
+net-phy-micrel-use-genphy_read_status-for-ksz9131.patch
+net-qrtr-send-msgs-from-local-of-same-id-as-broadcast.patch
+net-revert-default-napi-poll-timeout-to-2-jiffies.patch
+net-tun-record-rx-queue-in-skb-before-do_xdp_generic.patch
+net-dsa-mt7530-move-mt7623-settings-out-off-the-mt7530.patch
+net-ethernet-mediatek-move-mt7623-settings-out-off-the-mt7530.patch
+net-mlx5-fix-frequent-ioread-pci-access-during-recovery.patch
+net-mlx5e-add-missing-release-firmware-call.patch
+net-mlx5e-fix-nest_level-for-vlan-pop-action.patch
+net-mlx5e-fix-pfnum-in-devlink-port-attribute.patch
+net-icmp6-do-not-select-saddr-from-iif-when-route-has-prefsrc-set.patch
+net-mscc-ocelot-fix-untagged-packet-drops-when-enslaving-to-vlan-aware-bridge.patch
+net-stmmac-dwmac-sunxi-provide-tx-and-rx-fifo-sizes.patch