diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index f2d8a149f3ac..10739b295ae5 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $NetBSD: elink3.c,v 1.128 2009/09/05 12:30:59 tsutsui Exp $ */ +/* $NetBSD: elink3.c,v 1.129 2009/09/15 19:20:29 dyoung Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.128 2009/09/05 12:30:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.129 2009/09/15 19:20:29 dyoung Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -2002,24 +2002,14 @@ int ep_activate(device_t self, enum devact act) { struct ep_softc *sc = device_private(self); - struct ifnet *ifp = &sc->sc_ethercom.ec_if; - int error = 0, s; - s = splnet(); switch (act) { - case DVACT_ACTIVATE: - error = EOPNOTSUPP; - break; - case DVACT_DEACTIVATE: - if (sc->ep_flags & ELINK_FLAGS_MII) - mii_activate(&sc->sc_mii, act, MII_PHY_ANY, - MII_OFFSET_ANY); - if_deactivate(ifp); - break; + if_deactivate(&sc->sc_ethercom.ec_if); + return 0; + default: + return EOPNOTSUPP; } - splx(s); - return (error); } /* diff --git a/sys/dev/ic/elinkxl.c b/sys/dev/ic/elinkxl.c index ec022c5d5d09..b1f3bd4a3fac 100644 --- a/sys/dev/ic/elinkxl.c +++ b/sys/dev/ic/elinkxl.c @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxl.c,v 1.108 2009/09/05 14:19:30 tsutsui Exp $ */ +/* $NetBSD: elinkxl.c,v 1.109 2009/09/15 19:20:30 dyoung Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.108 2009/09/05 14:19:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.109 2009/09/15 19:20:30 dyoung Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -1679,24 +1679,14 @@ int ex_activate(device_t self, enum devact act) { struct ex_softc *sc = device_private(self); - int s, error = 0; - s = splnet(); switch (act) { - case DVACT_ACTIVATE: - error = EOPNOTSUPP; - break; - case DVACT_DEACTIVATE: - if (sc->ex_conf & EX_CONF_MII) - mii_activate(&sc->ex_mii, act, MII_PHY_ANY, - MII_OFFSET_ANY); if_deactivate(&sc->sc_ethercom.ec_if); - break; + return 0; + default: + return EOPNOTSUPP; } - splx(s); - - return (error); } int diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index f4973b6e0666..e0c5363e3ee8 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.129 2009/03/16 12:13:04 tsutsui Exp $ */ +/* $NetBSD: i82557.c,v 1.130 2009/09/15 19:20:30 dyoung Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.129 2009/03/16 12:13:04 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.130 2009/09/15 19:20:30 dyoung Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -2482,24 +2482,14 @@ int fxp_activate(device_t self, enum devact act) { struct fxp_softc *sc = device_private(self); - int s, error = 0; - s = splnet(); switch (act) { - case DVACT_ACTIVATE: - error = EOPNOTSUPP; - break; - case DVACT_DEACTIVATE: - if (sc->sc_flags & FXPF_MII) - mii_activate(&sc->sc_mii, act, MII_PHY_ANY, - MII_OFFSET_ANY); if_deactivate(&sc->sc_ethercom.ec_if); - break; + return 0; + default: + return EOPNOTSUPP; } - splx(s); - - return (error); } /*