From e3c26e793643b597011f1ba8222e4c4438e99756 Mon Sep 17 00:00:00 2001 From: dlg Date: Mon, 3 Apr 2023 01:46:18 +0000 Subject: [PATCH] register mvneta so the interface can be found by node/phandle later. --- sys/dev/fdt/if_mvneta.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/fdt/if_mvneta.c b/sys/dev/fdt/if_mvneta.c index 9d0a321bea3..2152b360949 100644 --- a/sys/dev/fdt/if_mvneta.c +++ b/sys/dev/fdt/if_mvneta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvneta.c,v 1.28 2023/02/27 09:59:46 jmatthew Exp $ */ +/* $OpenBSD: if_mvneta.c,v 1.29 2023/04/03 01:46:18 dlg Exp $ */ /* $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $ */ /* * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi @@ -175,6 +175,8 @@ struct mvneta_softc { int sc_sfp; int sc_node; + struct if_device sc_ifd; + #if NKSTAT > 0 struct mutex sc_kstat_lock; struct timeout sc_kstat_tick; @@ -808,6 +810,10 @@ mvneta_attach_deferred(struct device *self) if_attach(ifp); ether_ifattach(ifp); + sc->sc_ifd.if_node = sc->sc_node; + sc->sc_ifd.if_ifp = ifp; + if_register(&sc->sc_ifd); + #if NKSTAT > 0 mvneta_kstat_attach(sc); #endif -- 2.20.1