Module Name: src Committed By: macallan Date: Wed Feb 28 23:08:30 UTC 2018
Modified Files: src/sys/dev/ic: gem.c Log Message: add workaround for PHY detection on Apple K2 GMAC adapted from openbsd To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.108 src/sys/dev/ic/gem.c:1.109 --- src/sys/dev/ic/gem.c:1.108 Mon Feb 20 07:43:29 2017 +++ src/sys/dev/ic/gem.c Wed Feb 28 23:08:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.108 2017/02/20 07:43:29 ozaki-r Exp $ */ +/* $NetBSD: gem.c,v 1.109 2018/02/28 23:08:30 macallan Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.108 2017/02/20 07:43:29 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.109 2018/02/28 23:08:30 macallan Exp $"); #include "opt_inet.h" @@ -410,7 +410,8 @@ gem_attach(struct gem_softc *sc, const u #endif /* Look for internal PHY if no external PHY was found */ if (LIST_EMPTY(&mii->mii_phys) && - sc->sc_mif_config & GEM_MIF_CONFIG_MDI0) { + ((sc->sc_mif_config & GEM_MIF_CONFIG_MDI0) || + (sc->sc_variant == GEM_APPLE_K2_GMAC))) { sc->sc_mif_config &= ~GEM_MIF_CONFIG_PHY_SEL; bus_space_write_4(t, h, GEM_MIF_CONFIG, sc->sc_mif_config);