Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2019 10:42:15 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350410 - head/sys/arm/ti/cpsw
Message-ID:  <201907291042.x6TAgFFX046759@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Mon Jul 29 10:42:15 2019
New Revision: 350410
URL: https://svnweb.freebsd.org/changeset/base/350410

Log:
  arm: ti: cpsw: Check the new slave node address
  
  Since DTS from >= Linux 5.0 the slave address are relative to the parent
  node address and aren't the full ones.
  Check both so the cpsw driver can find the phy id.

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==============================================================================
--- head/sys/arm/ti/cpsw/if_cpsw.c	Mon Jul 29 10:41:21 2019	(r350409)
+++ head/sys/arm/ti/cpsw/if_cpsw.c	Mon Jul 29 10:42:15 2019	(r350410)
@@ -755,7 +755,9 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, int port)
 			continue;
 		}
 		OF_prop_free(name);
-		if (mdio_child_addr != slave_mdio_addr[port])
+
+		if (mdio_child_addr != slave_mdio_addr[port] &&
+		    mdio_child_addr != (slave_mdio_addr[port] & 0xFFF))
 			continue;
 
 		if (fdt_get_phyaddr(child, NULL, &phy, NULL) != 0){



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907291042.x6TAgFFX046759>