[linux] 01/01: Revert "stmmac: Fix 'eth0: No PHY found' regression" (Closes: #823493)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun May 22 23:59:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit b88823f96b5cddb72539a93e8e56ec19e27651bd
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Mon May 23 00:59:14 2016 +0100

    Revert "stmmac: Fix 'eth0: No PHY found' regression" (Closes: #823493)
---
 debian/changelog                                   |  1 +
 ...t-stmmac-fix-eth0-no-phy-found-regression.patch | 93 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 95 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 15d4f65..23e00f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ linux (4.5.4-2) UNRELEASED; urgency=medium
   [ Ben Hutchings ]
   * aufs: Update support patches to aufs4.5-20160523
     - mmap: Fix use-after-free in remap_file_pages(2)
+  * Revert "stmmac: Fix 'eth0: No PHY found' regression" (Closes: #823493)
 
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 21 May 2016 16:47:59 +0200
 
diff --git a/debian/patches/bugfix/all/revert-stmmac-fix-eth0-no-phy-found-regression.patch b/debian/patches/bugfix/all/revert-stmmac-fix-eth0-no-phy-found-regression.patch
new file mode 100644
index 0000000..708edcf
--- /dev/null
+++ b/debian/patches/bugfix/all/revert-stmmac-fix-eth0-no-phy-found-regression.patch
@@ -0,0 +1,93 @@
+From: Giuseppe CAVALLARO <peppe.cavallaro at st.com>
+Date: Fri, 1 Apr 2016 09:07:15 +0200
+Subject: Revert "stmmac: Fix 'eth0: No PHY found' regression"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/linus/d7e944c8ddc0983640a9a32868fb217485d12ca2
+Bug-Debian: https://bugs.debian.org/823493
+
+This reverts commit 88f8b1bb41c6208f81b6a480244533ded7b59493.
+due to problems on GeekBox and Banana Pi M1 board when
+connected to a real transceiver instead of a switch via
+fixed-link.
+
+Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro at st.com>
+Cc: Gabriel Fernandez <gabriel.fernandez at linaro.org>
+Cc: Andreas Färber <afaerber at suse.de>
+Cc: Frank Schäfer <fschaefer.oss at googlemail.com>
+Cc: Dinh Nguyen <dinh.linux at gmail.com>
+Cc: David S. Miller <davem at davemloft.net>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c     | 11 ++++++++++-
+ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |  9 +--------
+ include/linux/stmmac.h                                |  1 -
+ 3 files changed, 11 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+@@ -199,12 +199,21 @@ int stmmac_mdio_register(struct net_devi
+ 	struct stmmac_priv *priv = netdev_priv(ndev);
+ 	struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
+ 	int addr, found;
+-	struct device_node *mdio_node = priv->plat->mdio_node;
++	struct device_node *mdio_node = NULL;
++	struct device_node *child_node = NULL;
+ 
+ 	if (!mdio_bus_data)
+ 		return 0;
+ 
+ 	if (IS_ENABLED(CONFIG_OF)) {
++		for_each_child_of_node(priv->device->of_node, child_node) {
++			if (of_device_is_compatible(child_node,
++						    "snps,dwmac-mdio")) {
++				mdio_node = child_node;
++				break;
++			}
++		}
++
+ 		if (mdio_node) {
+ 			netdev_dbg(ndev, "FOUND MDIO subnode\n");
+ 		} else {
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+@@ -110,7 +110,6 @@ stmmac_probe_config_dt(struct platform_d
+ 	struct device_node *np = pdev->dev.of_node;
+ 	struct plat_stmmacenet_data *plat;
+ 	struct stmmac_dma_cfg *dma_cfg;
+-	struct device_node *child_node = NULL;
+ 
+ 	plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
+ 	if (!plat)
+@@ -141,19 +140,13 @@ stmmac_probe_config_dt(struct platform_d
+ 		plat->phy_node = of_node_get(np);
+ 	}
+ 
+-	for_each_child_of_node(np, child_node)
+-		if (of_device_is_compatible(child_node,	"snps,dwmac-mdio")) {
+-			plat->mdio_node = child_node;
+-			break;
+-		}
+-
+ 	/* "snps,phy-addr" is not a standard property. Mark it as deprecated
+ 	 * and warn of its use. Remove this when phy node support is added.
+ 	 */
+ 	if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
+ 		dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
+ 
+-	if ((plat->phy_node && !of_phy_is_fixed_link(np)) || !plat->mdio_node)
++	if ((plat->phy_node && !of_phy_is_fixed_link(np)) || plat->phy_bus_name)
+ 		plat->mdio_bus_data = NULL;
+ 	else
+ 		plat->mdio_bus_data =
+--- a/include/linux/stmmac.h
++++ b/include/linux/stmmac.h
+@@ -100,7 +100,6 @@ struct plat_stmmacenet_data {
+ 	int interface;
+ 	struct stmmac_mdio_bus_data *mdio_bus_data;
+ 	struct device_node *phy_node;
+-	struct device_node *mdio_node;
+ 	struct stmmac_dma_cfg *dma_cfg;
+ 	int clk_csr;
+ 	int has_gmac;
diff --git a/debian/patches/series b/debian/patches/series
index 69435f6..95bd339 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -87,6 +87,7 @@ bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch
 bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch
 bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch
 bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch
+bugfix/all/revert-stmmac-fix-eth0-no-phy-found-regression.patch
 
 # Miscellaneous features
 features/all/mm-exclude-zone_device-from-gfp_zone_table.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list