Now that the *_activate() functions don't do things which are attachment
specific, move them into the chipset drivers.
This commit is contained in:
parent
7675f01a71
commit
1d0f24882d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dp8390.c,v 1.15 1998/11/17 20:25:00 thorpej Exp $ */
|
||||
/* $NetBSD: dp8390.c,v 1.16 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
|
||||
|
@ -1264,3 +1264,31 @@ dp8390_disable(sc)
|
|||
sc->sc_enabled = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
dp8390_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct dp8390_softc *sc = (struct dp8390_softc *)self;
|
||||
int rv = 0, s;
|
||||
|
||||
s = splnet();
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. */
|
||||
dp8390_disable(sc);
|
||||
break;
|
||||
}
|
||||
splx(s);
|
||||
return (rv);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dp8390var.h,v 1.9 1998/11/17 20:25:00 thorpej Exp $ */
|
||||
/* $NetBSD: dp8390var.h,v 1.10 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
|
||||
|
@ -142,3 +142,5 @@ void dp8390_read __P((struct dp8390_softc *, int, u_short));
|
|||
|
||||
int dp8390_enable __P((struct dp8390_softc *));
|
||||
void dp8390_disable __P((struct dp8390_softc *));
|
||||
|
||||
int dp8390_activate __P((struct device *, enum devact));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: elink3.c,v 1.49 1998/11/17 20:25:00 thorpej Exp $ */
|
||||
/* $NetBSD: elink3.c,v 1.50 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -1979,6 +1979,34 @@ epdisable(sc)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
ep_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct ep_softc *sc = (struct ep_softc *)self;
|
||||
int rv = 0, s;
|
||||
|
||||
s = splnet();
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ethercom.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. */
|
||||
epdisable(sc);
|
||||
break;
|
||||
}
|
||||
splx(s);
|
||||
return (rv);
|
||||
}
|
||||
|
||||
void
|
||||
ep_mii_setbit(sc, bit)
|
||||
struct ep_softc *sc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: elink3var.h,v 1.20 1998/11/17 20:25:01 thorpej Exp $ */
|
||||
/* $NetBSD: elink3var.h,v 1.21 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Herb Peyerl <hpeyerl@beer.org>
|
||||
|
@ -114,3 +114,5 @@ void epstop __P((struct ep_softc *));
|
|||
|
||||
int epenable __P((struct ep_softc *));
|
||||
void epdisable __P((struct ep_softc *));
|
||||
|
||||
int ep_activate __P((struct device *, enum devact));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mb86960.c,v 1.27 1998/11/17 20:25:01 thorpej Exp $ */
|
||||
/* $NetBSD: mb86960.c,v 1.28 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
|
||||
|
@ -1803,6 +1803,34 @@ mb86960_disable(sc)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
mb86960_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct mb86960_softc *sc = (struct mb86960_softc *)self;
|
||||
int rv = 0, s;
|
||||
|
||||
s = splnet();
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. */
|
||||
mb86960_disable(sc);
|
||||
break;
|
||||
}
|
||||
splx(s);
|
||||
return (rv);
|
||||
}
|
||||
|
||||
#if FE_DEBUG >= 1
|
||||
void
|
||||
mb86960_dump(level, sc)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mb86960var.h,v 1.22 1998/11/17 20:25:01 thorpej Exp $ */
|
||||
/* $NetBSD: mb86960var.h,v 1.23 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
|
||||
|
@ -207,3 +207,4 @@ void mb86960_config __P((struct mb86960_softc *, int *, int, int));
|
|||
int mb86960_intr __P((void *));
|
||||
int mb86960_enable __P((struct mb86960_softc *));
|
||||
void mb86960_disable __P((struct mb86960_softc *));
|
||||
int mb86960_activate __P((struct device *, enum devact));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: smc91cxx.c,v 1.12 1998/11/17 20:25:01 thorpej Exp $ */
|
||||
/* $NetBSD: smc91cxx.c,v 1.13 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -1190,3 +1190,31 @@ smc91cxx_disable(sc)
|
|||
sc->sc_enabled = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
smc91cxx_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct smc91cxx_softc *sc = (struct smc91cxx_softc *)self;
|
||||
int rv = 0, s;
|
||||
|
||||
s = splnet();
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. */
|
||||
smc91cxx_disable(sc);
|
||||
break;
|
||||
}
|
||||
splx(s);
|
||||
return (rv);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: smc91cxxvar.h,v 1.5 1998/11/17 20:25:01 thorpej Exp $ */
|
||||
/* $NetBSD: smc91cxxvar.h,v 1.6 1998/11/18 18:34:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -70,3 +70,4 @@ void smc91cxx_attach __P((struct smc91cxx_softc *, u_int8_t *));
|
|||
int smc91cxx_intr __P((void *));
|
||||
int smc91cxx_enable __P((struct smc91cxx_softc *));
|
||||
void smc91cxx_disable __P((struct smc91cxx_softc *));
|
||||
int smc91cxx_activate __P((struct device *, enum devact));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ep_pcmcia.c,v 1.19 1998/11/18 18:15:56 thorpej Exp $ */
|
||||
/* $NetBSD: if_ep_pcmcia.c,v 1.20 1998/11/18 18:34:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -119,7 +119,6 @@
|
|||
int ep_pcmcia_match __P((struct device *, struct cfdata *, void *));
|
||||
void ep_pcmcia_attach __P((struct device *, struct device *, void *));
|
||||
int ep_pcmcia_detach __P((struct device *, int));
|
||||
int ep_pcmcia_activate __P((struct device *, enum devact));
|
||||
|
||||
int ep_pcmcia_get_enaddr __P((struct pcmcia_tuple *, void *));
|
||||
int ep_pcmcia_enable __P((struct ep_softc *));
|
||||
|
@ -139,7 +138,7 @@ struct ep_pcmcia_softc {
|
|||
|
||||
struct cfattach ep_pcmcia_ca = {
|
||||
sizeof(struct ep_pcmcia_softc), ep_pcmcia_match, ep_pcmcia_attach,
|
||||
ep_pcmcia_detach, ep_pcmcia_activate
|
||||
ep_pcmcia_detach, ep_activate
|
||||
};
|
||||
|
||||
struct ep_pcmcia_product {
|
||||
|
@ -388,33 +387,6 @@ ep_pcmcia_detach(self, flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
ep_pcmcia_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *)self;
|
||||
struct ep_softc *sc = &psc->sc_ep;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ethercom.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. This releases our interrupt. */
|
||||
epdisable(sc);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
ep_pcmcia_get_enaddr(tuple, arg)
|
||||
struct pcmcia_tuple *tuple;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_mbe_pcmcia.c,v 1.5 1998/11/18 18:15:56 thorpej Exp $ */
|
||||
/* $NetBSD: if_mbe_pcmcia.c,v 1.6 1998/11/18 18:34:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -58,7 +58,6 @@
|
|||
int mbe_pcmcia_match __P((struct device *, struct cfdata *, void *));
|
||||
void mbe_pcmcia_attach __P((struct device *, struct device *, void *));
|
||||
int mbe_pcmcia_detach __P((struct device *, int));
|
||||
int mbe_pcmcia_activate __P((struct device *, enum devact));
|
||||
|
||||
struct mbe_pcmcia_softc {
|
||||
struct mb86960_softc sc_mb86960; /* real "mb" softc */
|
||||
|
@ -72,7 +71,7 @@ struct mbe_pcmcia_softc {
|
|||
|
||||
struct cfattach mbe_pcmcia_ca = {
|
||||
sizeof(struct mbe_pcmcia_softc), mbe_pcmcia_match, mbe_pcmcia_attach,
|
||||
mbe_pcmcia_detach, mbe_pcmcia_activate
|
||||
mbe_pcmcia_detach, mb86960_activate
|
||||
};
|
||||
|
||||
#if NetBSD <= 199712
|
||||
|
@ -223,33 +222,6 @@ mbe_pcmcia_detach(self, flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
mbe_pcmcia_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct mbe_pcmcia_softc *psc = (struct mbe_pcmcia_softc *)self;
|
||||
struct mb86960_softc *sc = &psc->sc_mb86960;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. This releases our interrupt. */
|
||||
mb86960_disable(sc);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
mbe_pcmcia_enable(sc)
|
||||
struct mb86960_softc *sc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ne_pcmcia.c,v 1.26 1998/11/18 18:15:57 thorpej Exp $ */
|
||||
/* $NetBSD: if_ne_pcmcia.c,v 1.27 1998/11/18 18:34:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
|
||||
|
@ -59,7 +59,6 @@
|
|||
int ne_pcmcia_match __P((struct device *, struct cfdata *, void *));
|
||||
void ne_pcmcia_attach __P((struct device *, struct device *, void *));
|
||||
int ne_pcmcia_detach __P((struct device *, int));
|
||||
int ne_pcmcia_activate __P((struct device *, enum devact));
|
||||
|
||||
int ne_pcmcia_enable __P((struct dp8390_softc *));
|
||||
void ne_pcmcia_disable __P((struct dp8390_softc *));
|
||||
|
@ -77,7 +76,7 @@ struct ne_pcmcia_softc {
|
|||
|
||||
struct cfattach ne_pcmcia_ca = {
|
||||
sizeof(struct ne_pcmcia_softc), ne_pcmcia_match, ne_pcmcia_attach,
|
||||
ne_pcmcia_detach, ne_pcmcia_activate
|
||||
ne_pcmcia_detach, dp8390_activate
|
||||
};
|
||||
|
||||
struct ne2000dev {
|
||||
|
@ -529,33 +528,6 @@ ne_pcmcia_detach(self, flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
ne_pcmcia_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct ne_pcmcia_softc *psc = (struct ne_pcmcia_softc *)self;
|
||||
struct dp8390_softc *sc = &psc->sc_ne2000.sc_dp8390;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. This releases our interrupt. */
|
||||
dp8390_disable(sc);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
ne_pcmcia_enable(dsc)
|
||||
struct dp8390_softc *dsc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_sm_pcmcia.c,v 1.14 1998/11/18 18:15:57 thorpej Exp $ */
|
||||
/* $NetBSD: if_sm_pcmcia.c,v 1.15 1998/11/18 18:34:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -87,7 +87,6 @@
|
|||
int sm_pcmcia_match __P((struct device *, struct cfdata *, void *));
|
||||
void sm_pcmcia_attach __P((struct device *, struct device *, void *));
|
||||
int sm_pcmcia_detach __P((struct device *, int));
|
||||
int sm_pcmcia_activate __P((struct device *, enum devact));
|
||||
|
||||
struct sm_pcmcia_softc {
|
||||
struct smc91cxx_softc sc_smc; /* real "smc" softc */
|
||||
|
@ -101,7 +100,7 @@ struct sm_pcmcia_softc {
|
|||
|
||||
struct cfattach sm_pcmcia_ca = {
|
||||
sizeof(struct sm_pcmcia_softc), sm_pcmcia_match, sm_pcmcia_attach,
|
||||
sm_pcmcia_detach, sm_pcmcia_activate
|
||||
sm_pcmcia_detach, smc91cxx_activate
|
||||
};
|
||||
|
||||
int sm_pcmcia_enable __P((struct smc91cxx_softc *));
|
||||
|
@ -273,33 +272,6 @@ sm_pcmcia_detach(self, flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
sm_pcmcia_activate(self, act)
|
||||
struct device *self;
|
||||
enum devact act;
|
||||
{
|
||||
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)self;
|
||||
struct smc91cxx_softc *sc = &psc->sc_smc;
|
||||
int rv = 0;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_ACTIVATE:
|
||||
rv = EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case DVACT_DEACTIVATE:
|
||||
#ifdef notyet
|
||||
/* First, kill off the interface. */
|
||||
if_detach(sc->sc_ec.ec_if);
|
||||
#endif
|
||||
|
||||
/* Now disable the interface. This releases our interrupt. */
|
||||
smc91cxx_disable(sc);
|
||||
break;
|
||||
}
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
sm_pcmcia_ascii_enaddr(cisstr, myla)
|
||||
const char *cisstr;
|
||||
|
|
Loading…
Reference in New Issue