Never bindings use the phy-handle property instead of the phy property.
authorpatrick <patrick@openbsd.org>
Thu, 21 Mar 2024 23:12:33 +0000 (23:12 +0000)
committerpatrick <patrick@openbsd.org>
Thu, 21 Mar 2024 23:12:33 +0000 (23:12 +0000)
ok kettenis@

sys/dev/fdt/if_mvneta.c

index c602de5..dbfb10c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_mvneta.c,v 1.31 2023/11/10 15:51:19 bluhm Exp $    */
+/*     $OpenBSD: if_mvneta.c,v 1.32 2024/03/21 23:12:33 patrick Exp $  */
 /*     $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $  */
 /*
  * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
@@ -502,7 +502,9 @@ mvneta_attach(struct device *parent, struct device *self, void *aux)
        }
 
        if (!sc->sc_fixed_link) {
-               sc->sc_phy = OF_getpropint(faa->fa_node, "phy", 0);
+               sc->sc_phy = OF_getpropint(faa->fa_node, "phy-handle", 0);
+               if (!sc->sc_phy)
+                       sc->sc_phy = OF_getpropint(faa->fa_node, "phy", 0);
                node = OF_getnodebyphandle(sc->sc_phy);
                if (!node) {
                        printf(": cannot find phy in fdt\n");