From 9608284c74cd2d6fb0bf74a94f026c3a0d739ee6 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 9 Mar 2019 20:13:17 +0100 Subject: [PATCH] ipq40xx: fix NPE related to bogus use of fixed phy This patch fixes a not-fully-debugged NPE that occures because a fixed-phy is told to resume, which it obviously can't. Signed-off-by: Christian Lamparter --- .../patches-4.19/709-fix-npe-in-phy-c.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 target/linux/ipq40xx/patches-4.19/709-fix-npe-in-phy-c.patch diff --git a/target/linux/ipq40xx/patches-4.19/709-fix-npe-in-phy-c.patch b/target/linux/ipq40xx/patches-4.19/709-fix-npe-in-phy-c.patch new file mode 100644 index 0000000000..c976a5f51a --- /dev/null +++ b/target/linux/ipq40xx/patches-4.19/709-fix-npe-in-phy-c.patch @@ -0,0 +1,20 @@ +--- a/drivers/net/phy/phy.c ++++ b/drivers/net/phy/phy.c +@@ -982,13 +982,15 @@ EXPORT_SYMBOL(phy_start); + + static void phy_link_up(struct phy_device *phydev) + { +- phydev->phy_link_change(phydev, true, true); ++ if (phydev->phy_link_change) ++ phydev->phy_link_change(phydev, true, true); + phy_led_trigger_change_speed(phydev); + } + + static void phy_link_down(struct phy_device *phydev, bool do_carrier) + { +- phydev->phy_link_change(phydev, false, do_carrier); ++ if (phydev->phy_link_change) ++ phydev->phy_link_change(phydev, false, do_carrier); + phy_led_trigger_change_speed(phydev); + } + -- 2.30.2