Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev sparc64/vnet(4): device_t/softc split
details: https://anonhg.NetBSD.org/src/rev/e384a3cdf01c
branches: trunk
changeset: 361137:e384a3cdf01c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 11 23:49:28 2022 +0000
description:
sparc64/vnet(4): device_t/softc split
diffstat:
sys/arch/sparc64/dev/vnet.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (48 lines):
diff -r 5ee6e70dd191 -r e384a3cdf01c sys/arch/sparc64/dev/vnet.c
--- a/sys/arch/sparc64/dev/vnet.c Fri Feb 11 23:49:19 2022 +0000
+++ b/sys/arch/sparc64/dev/vnet.c Fri Feb 11 23:49:28 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnet.c,v 1.5 2021/03/15 18:44:04 palle Exp $ */
+/* $NetBSD: vnet.c,v 1.6 2022/02/11 23:49:28 riastradh Exp $ */
/* $OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $ */
/*
* Copyright (c) 2009, 2015 Mark Kettenis
@@ -128,7 +128,7 @@
};
struct vnet_softc {
- struct device sc_dv;
+ device_t sc_dv;
bus_space_tag_t sc_bustag;
bus_dma_tag_t sc_dmatag;
@@ -247,6 +247,7 @@
struct ldc_conn *lc;
struct ifnet *ifp;
+ sc->sc_dv = self;
sc->sc_bustag = ca->ca_bustag;
sc->sc_dmatag = ca->ca_dmatag;
sc->sc_tx_ino = ca->ca_tx_ino;
@@ -304,8 +305,10 @@
/*
* Each interface gets its own pool.
*/
- pool_init(&sc->sc_pool, 2048, 0, 0, 0, sc->sc_dv.dv_xname, NULL, IPL_NET);
-
+ pool_init(&sc->sc_pool, /*size*/2048, /*align*/0, /*align_offset*/0,
+ /*flags*/0, /*wchan*/device_xname(sc->sc_dv), /*palloc*/NULL,
+ IPL_NET);
+
ifp = &sc->sc_ethercom.ec_if;
ifp->if_softc = sc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -1392,7 +1395,7 @@
struct vnet_softc *sc = ifp->if_softc;
- printf("%s: watchdog timeout\n", sc->sc_dv.dv_xname);
+ printf("%s: watchdog timeout\n", device_xname(sc->sc_dv));
}
int
Home |
Main Index |
Thread Index |
Old Index