[4.2.y-ckt stable] Patch "phy: micrel: Fix finding PHY properties in MAC node for KSZ9031." has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Wed Jan 27 00:14:07 UTC 2016
This is a note to let you know that I have just added a patch titled
phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt3.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 433c50b034c562385eb5149af8169f124905de2a Mon Sep 17 00:00:00 2001
From: Roosen Henri <Henri.Roosen at ginzinger.com>
Date: Thu, 7 Jan 2016 09:31:15 +0100
Subject: phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.
commit b4c19f71252e3b6b8c6478fd712c592f00b11438 upstream.
Commit 651df2183543 ("phy: micrel: Fix finding PHY properties in MAC
node.") only fixes finding PHY properties in MAC node for KSZ9021. This
commit applies the same fix for KSZ9031.
Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
Acked-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: Henri Roosen <henri.roosen at ginzinger.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/net/phy/micrel.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 4bb8149..6f719b3 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -470,9 +470,17 @@ static int ksz9031_config_init(struct phy_device *phydev)
"txd2-skew-ps", "txd3-skew-ps"
};
static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"};
+ const struct device *dev_walker;
- if (!of_node && dev->parent->of_node)
- of_node = dev->parent->of_node;
+ /* The Micrel driver has a deprecated option to place phy OF
+ * properties in the MAC node. Walk up the tree of devices to
+ * find a device with an OF node.
+ */
+ dev_walker = &phydev->dev;
+ do {
+ of_node = dev_walker->of_node;
+ dev_walker = dev_walker->parent;
+ } while (!of_node && dev_walker);
if (of_node) {
ksz9031_of_load_skew_values(phydev, of_node,
--
1.9.1
More information about the kernel-team
mailing list