aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/octeon
diff options
context:
space:
mode:
authorRoman Kuzmitskii <damex.pp@icloud.com>2020-11-01 20:46:05 +0000
committerDaniel Golle <daniel@makrotopia.org>2020-11-05 19:29:48 +0000
commit577ac8ce8464855cf26644197f57e32cb39c4ff9 (patch)
tree35fc8e0fd461a621cd2f302177d4f7af5235d7fe /target/linux/octeon
parenta8ceda752c8f6d5ee84bfc4d2d24a5b326c9e671 (diff)
downloadupstream-577ac8ce8464855cf26644197f57e32cb39c4ff9.tar.gz
upstream-577ac8ce8464855cf26644197f57e32cb39c4ff9.tar.bz2
upstream-577ac8ce8464855cf26644197f57e32cb39c4ff9.zip
octeon: honor disabled sgmii device tree nodes
adds patch to octeon ethernet driver that lets sgmii interface device tree node to be disabled and that disabled interface won't be unnecessarily initialized. It solves the problem with octeon boards that have 8 sgmii or more ports initialized but have nothing connected to them. Tested-by: Johannes Kimmel <fff@bareminimum.eu> Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
Diffstat (limited to 'target/linux/octeon')
-rw-r--r--target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch b/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch
new file mode 100644
index 0000000000..af223dc314
--- /dev/null
+++ b/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch
@@ -0,0 +1,27 @@
+From: Roman Kuzmitskii <damex.pp@icloud.com>
+Date: Sun, 01 Nov 2020 19:00:00 +0000
+Subject: [PATCH] staging: octeon: sgmii to honor disabled dt node status
+
+With this patch, sgmii interface device tree node could be disabled and
+that disabled interface will not be unnecessarily initialized.
+
+It solves the problem with Octeon boards that have 8 sgmii or more ports
+initialized but have nothing connected to them.
+
+Tested-by: Johannes Kimmel <fff@bareminimum.eu>
+Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
+--- a/drivers/staging/octeon/ethernet.c
++++ b/drivers/staging/octeon/ethernet.c
+@@ -884,8 +884,10 @@
+
+ case CVMX_HELPER_INTERFACE_MODE_SGMII:
+ priv->phy_mode = PHY_INTERFACE_MODE_SGMII;
+- dev->netdev_ops = &cvm_oct_sgmii_netdev_ops;
+- strscpy(dev->name, "eth%d", sizeof(dev->name));
++ if (of_device_is_available(priv->of_node)) {
++ dev->netdev_ops = &cvm_oct_sgmii_netdev_ops;
++ strscpy(dev->name, "eth%d", sizeof(dev->name));
++ }
+ break;
+
+ case CVMX_HELPER_INTERFACE_MODE_SPI: