sync with OpenBSD -current
This commit is contained in:
parent
9419b92700
commit
b62220995a
133 changed files with 2000 additions and 5128 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_alc.c,v 1.58 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_alc.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -1465,23 +1465,18 @@ alc_activate(struct device *self, int act)
|
|||
{
|
||||
struct alc_softc *sc = (struct alc_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
alc_stop(sc);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
alc_init(ifp);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_ale.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_ale.c,v 1.52 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -583,23 +583,18 @@ ale_activate(struct device *self, int act)
|
|||
{
|
||||
struct ale_softc *sc = (struct ale_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
ale_stop(sc);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
ale_init(ifp);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_bce.c,v 1.56 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_bce.c,v 1.57 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -445,7 +445,6 @@ bce_activate(struct device *self, int act)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_bge.c,v 1.405 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_bge.c,v 1.406 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wind River Systems
|
||||
|
@ -3251,11 +3251,9 @@ bge_activate(struct device *self, int act)
|
|||
{
|
||||
struct bge_softc *sc = (struct bge_softc *)self;
|
||||
struct ifnet *ifp = &sc->arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
rv = config_activate_children(self, act);
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
bge_stop(sc, 0);
|
||||
break;
|
||||
|
@ -3263,11 +3261,8 @@ bge_activate(struct device *self, int act)
|
|||
if (ifp->if_flags & IFF_UP)
|
||||
bge_init(sc);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
/* $OpenBSD: if_em.c,v 1.377 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_em.c,v 1.378 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
|
||||
|
||||
#include <dev/pci/if_em.h>
|
||||
|
@ -2076,24 +2076,18 @@ em_activate(struct device *self, int act)
|
|||
{
|
||||
struct em_softc *sc = (struct em_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_ac.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
em_stop(sc, 0);
|
||||
/* We have no children atm, but we will soon */
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
em_init(sc);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_ix.c,v 1.215 2024/05/21 11:19:39 bluhm Exp $ */
|
||||
/* $OpenBSD: if_ix.c,v 1.216 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
|
@ -401,7 +401,6 @@ ixgbe_activate(struct device *self, int act)
|
|||
struct ifnet *ifp = &sc->arpcom.ac_if;
|
||||
struct ixgbe_hw *hw = &sc->hw;
|
||||
uint32_t ctrl_ext;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_QUIESCE:
|
||||
|
@ -430,10 +429,8 @@ ixgbe_activate(struct device *self, int act)
|
|||
if (ifp->if_flags & IFF_UP)
|
||||
ixgbe_init(sc);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_lii.c,v 1.47 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_lii.c,v 1.48 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 The NetBSD Foundation.
|
||||
|
@ -282,23 +282,18 @@ lii_activate(struct device *self, int act)
|
|||
{
|
||||
struct lii_softc *sc = (struct lii_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_ac.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
lii_stop(ifp);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
lii_init(ifp);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_msk.c,v 1.144 2024/05/24 06:02:53 jsg Exp $ */
|
||||
/* $OpenBSD: if_msk.c,v 1.145 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
|
@ -1173,7 +1173,6 @@ msk_activate(struct device *self, int act)
|
|||
{
|
||||
struct sk_if_softc *sc_if = (void *)self;
|
||||
struct ifnet *ifp = &sc_if->arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_RESUME:
|
||||
|
@ -1181,11 +1180,8 @@ msk_activate(struct device *self, int act)
|
|||
if (ifp->if_flags & IFF_RUNNING)
|
||||
msk_init(sc_if);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_nfe.c,v 1.126 2024/05/24 06:02:56 jsg Exp $ */
|
||||
/* $OpenBSD: if_nfe.c,v 1.127 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
|
||||
|
@ -162,23 +162,18 @@ nfe_activate(struct device *self, int act)
|
|||
{
|
||||
struct nfe_softc *sc = (struct nfe_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
nfe_stop(ifp, 0);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
nfe_init(ifp);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_re_pci.c,v 1.58 2024/05/24 06:02:56 jsg Exp $ */
|
||||
/* $OpenBSD: if_re_pci.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
|
||||
|
@ -247,6 +247,5 @@ re_pci_activate(struct device *self, int act)
|
|||
re_init(ifp);
|
||||
break;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_rge.c,v 1.34 2024/08/21 01:22:31 dlg Exp $ */
|
||||
/* $OpenBSD: if_rge.c,v 1.35 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019, 2020, 2023, 2024
|
||||
|
@ -324,20 +324,15 @@ rge_activate(struct device *self, int act)
|
|||
#ifndef SMALL_KERNEL
|
||||
struct rge_softc *sc = (struct rge_softc *)self;
|
||||
#endif
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_POWERDOWN:
|
||||
rv = config_activate_children(self, act);
|
||||
#ifndef SMALL_KERNEL
|
||||
rge_wol_power(sc);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_se.c,v 1.25 2024/05/24 06:02:56 jsg Exp $ */
|
||||
/* $OpenBSD: if_se.c,v 1.26 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de>
|
||||
|
@ -732,24 +732,18 @@ se_activate(struct device *self, int act)
|
|||
{
|
||||
struct se_softc *sc = (struct se_softc *)self;
|
||||
struct ifnet *ifp = &sc->sc_ac.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
se_stop(sc);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
(void)se_init(ifp);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_sis.c,v 1.145 2024/05/24 06:02:56 jsg Exp $ */
|
||||
/* $OpenBSD: if_sis.c,v 1.146 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
||||
|
@ -1219,23 +1219,18 @@ sis_activate(struct device *self, int act)
|
|||
{
|
||||
struct sis_softc *sc = (struct sis_softc *)self;
|
||||
struct ifnet *ifp = &sc->arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
sis_stop(sc);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
sis_init(sc);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_sk.c,v 1.197 2024/06/26 01:40:49 jsg Exp $ */
|
||||
/* $OpenBSD: if_sk.c,v 1.198 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
|
@ -1126,7 +1126,6 @@ sk_activate(struct device *self, int act)
|
|||
{
|
||||
struct sk_if_softc *sc_if = (void *)self;
|
||||
struct ifnet *ifp = &sc_if->arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_RESUME:
|
||||
|
@ -1134,11 +1133,8 @@ sk_activate(struct device *self, int act)
|
|||
if (ifp->if_flags & IFF_RUNNING)
|
||||
sk_init(sc_if);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_vr.c,v 1.161 2024/05/24 06:02:57 jsg Exp $ */
|
||||
/* $OpenBSD: if_vr.c,v 1.162 2024/08/31 16:23:09 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998
|
||||
|
@ -681,23 +681,18 @@ vr_activate(struct device *self, int act)
|
|||
{
|
||||
struct vr_softc *sc = (struct vr_softc *)self;
|
||||
struct ifnet *ifp = &sc->arpcom.ac_if;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
if (ifp->if_flags & IFF_RUNNING)
|
||||
vr_stop(sc);
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
case DVACT_RESUME:
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
vr_init(sc);
|
||||
break;
|
||||
default:
|
||||
rv = config_activate_children(self, act);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue