summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorJason Liu <jason.hui.liu@nxp.com>2022-05-21 15:32:59 -0500
committerJason Liu <jason.hui.liu@nxp.com>2022-06-29 11:35:21 -0500
commiteba369f0f66db8e57d52d788f455ebf80b52efa1 (patch)
tree8fbf20f34a2ac5ae285d083dde786560b0969ee9 /net/dsa
parent056b375c471639e87c8f5cb49aeebab87ff8015c (diff)
parent9f43e3ac7e662f352f829077723fa0b92ccaded1 (diff)
Merge tag 'v5.15.41' into lf-5.15.y
This is the 5.15.41 stable release * tag 'v5.15.41': (1977 commits) Linux 5.15.41 usb: gadget: uvc: allow for application to cleanly shutdown usb: gadget: uvc: rename function to be more consistent ... Signed-off-by: Jason Liu <jason.hui.liu@nxp.com> Conflicts: arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi arch/arm64/configs/defconfig drivers/clk/imx/clk-imx8qxp-lpcg.c drivers/dma/imx-sdma.c drivers/gpu/drm/bridge/nwl-dsi.c drivers/mailbox/imx-mailbox.c drivers/net/phy/at803x.c drivers/tty/serial/fsl_lpuart.c security/keys/trusted-keys/trusted_core.c
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/port.c2
-rw-r--r--net/dsa/tag_hellcreek.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c
index b6677c626484..92b401263382 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -1530,8 +1530,10 @@ int dsa_port_link_register_of(struct dsa_port *dp)
if (ds->ops->phylink_mac_link_down)
ds->ops->phylink_mac_link_down(ds, port,
MLO_AN_FIXED, PHY_INTERFACE_MODE_NA);
+ of_node_put(phy_np);
return dsa_port_phylink_register(dp);
}
+ of_node_put(phy_np);
return 0;
}
diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c
index f64b805303cd..eb204ad36eee 100644
--- a/net/dsa/tag_hellcreek.c
+++ b/net/dsa/tag_hellcreek.c
@@ -21,6 +21,14 @@ static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
struct dsa_port *dp = dsa_slave_to_port(dev);
u8 *tag;
+ /* Calculate checksums (if required) before adding the trailer tag to
+ * avoid including it in calculations. That would lead to wrong
+ * checksums after the switch strips the tag.
+ */
+ if (skb->ip_summed == CHECKSUM_PARTIAL &&
+ skb_checksum_help(skb))
+ return NULL;
+
/* Tag encoding */
tag = skb_put(skb, HELLCREEK_TAG_LEN);
*tag = BIT(dp->index);