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){
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to