Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic add workaround for PHY detection on Apple K2 GMAC



details:   https://anonhg.NetBSD.org/src/rev/e6deb041e51d
branches:  trunk
changeset: 359906:e6deb041e51d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Feb 28 23:08:30 2018 +0000

description:
add workaround for PHY detection on Apple K2 GMAC
adapted from openbsd

diffstat:

 sys/dev/ic/gem.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 924d890e8834 -r e6deb041e51d sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c  Wed Feb 28 22:36:02 2018 +0000
+++ b/sys/dev/ic/gem.c  Wed Feb 28 23:08:30 2018 +0000
@@ -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 @@
 #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);



Home | Main Index | Thread Index | Old Index