-/* $OpenBSD: com_pcmcia.c,v 1.25 2000/02/03 19:42:19 angelos Exp $ */
+/* $OpenBSD: com_pcmcia.c,v 1.26 2000/04/24 19:43:35 niklas Exp $ */
/* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */
/*
pcmcia_function_enable(sc->sc_pf);
printf("%s:", sc->sc_com.sc_dev.dv_xname);
sc->sc_ih = pcmcia_intr_establish(sc->sc_pf, IPL_TTY,
- comintr, sc);
+ comintr, sc);
printf("\n");
break;
case DVACT_DEACTIVATE:
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
- com_pcmcia_disable1(sc);
pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
+ com_pcmcia_disable1(sc);
}
void
-/* $OpenBSD: if_an_pcmcia.c,v 1.1 2000/04/03 01:02:00 mickey Exp $ */
+/* $OpenBSD: if_an_pcmcia.c,v 1.2 2000/04/24 19:43:35 niklas Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
an_stop(sc);
- pcmcia_function_disable(psc->sc_pf);
pcmcia_intr_disestablish(psc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(psc->sc_pf);
break;
}
/* $NetBSD: if_awi_pcmcia.c,v 1.5 1999/11/06 16:43:54 sommerfeld Exp $ */
-/* $OpenBSD: if_awi_pcmcia.c,v 1.2 2000/02/11 10:29:36 niklas Exp $ */
+/* $OpenBSD: if_awi_pcmcia.c,v 1.3 2000/04/24 19:43:35 niklas Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
struct awi_pcmcia_softc *psc = (struct awi_pcmcia_softc *) sc;
struct pcmcia_function *pf = psc->sc_pf;
- pcmcia_function_disable (pf);
pcmcia_intr_disestablish (pf, sc->sc_ih);
+ pcmcia_function_disable (pf);
}
int
-/* $OpenBSD: if_cnw.c,v 1.5 2000/02/03 18:47:06 angelos Exp $ */
+/* $OpenBSD: if_cnw.c,v 1.6 2000/04/24 19:43:35 niklas Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
}
case DVACT_DEACTIVATE:
ifp->if_timer = 0;
ifp->if_flags &= ~IFF_RUNNING; /* XXX no cnw_stop() ? */
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
-/* $OpenBSD: if_ep_pcmcia.c,v 1.22 2000/04/24 15:27:02 fgsch Exp $ */
+/* $OpenBSD: if_ep_pcmcia.c,v 1.23 2000/04/24 19:43:35 niklas Exp $ */
/* $NetBSD: if_ep_pcmcia.c,v 1.16 1998/08/17 23:20:40 thorpej Exp $ */
/*-
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
- ep_pcmcia_disable1(sc);
pcmcia_intr_disestablish(psc->sc_pf, sc->sc_ih);
+ ep_pcmcia_disable1(sc);
}
void
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
epstop(esc);
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ep.sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
-/* $OpenBSD: if_ne_pcmcia.c,v 1.26 2000/04/19 09:19:43 fgsch Exp $ */
+/* $OpenBSD: if_ne_pcmcia.c,v 1.27 2000/04/24 19:43:35 niklas Exp $ */
/* $NetBSD: if_ne_pcmcia.c,v 1.17 1998/08/15 19:00:04 thorpej Exp $ */
/*
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
dp8390_stop(esc);
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
{
struct ne_pcmcia_softc *psc = (struct ne_pcmcia_softc *)dsc;
- pcmcia_function_disable(psc->sc_pf);
-
pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
+ pcmcia_function_disable(psc->sc_pf);
}
-/* $OpenBSD: if_ray.c,v 1.2 2000/03/23 20:02:57 mickey Exp $ */
+/* $OpenBSD: if_ray.c,v 1.3 2000/04/24 19:43:35 niklas Exp $ */
/* $NetBSD: if_ray.c,v 1.17 2000/03/23 07:01:42 thorpej Exp $ */
/*
#ifdef __NetBSD__
if_deactivate(ifp);
#elif defined(__OpenBSD__)
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
#endif
break;
}
-/* $OpenBSD: if_rln_pcmcia.c,v 1.9 2000/02/05 13:55:45 d Exp $ */
+/* $OpenBSD: if_rln_pcmcia.c,v 1.10 2000/04/24 19:43:36 niklas Exp $ */
/*
* David Leonard <d@openbsd.org>, 1999. Public domain.
*
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
rlnstop(sc);
- pcmcia_function_disable(psc->psc_pf);
pcmcia_intr_disestablish(psc->psc_pf, psc->psc_ih);
+ pcmcia_function_disable(psc->psc_pf);
break;
}
splx(s);
-/* $OpenBSD: if_sm_pcmcia.c,v 1.11 2000/02/02 19:09:59 fgsch Exp $ */
+/* $OpenBSD: if_sm_pcmcia.c,v 1.12 2000/04/24 19:43:36 niklas Exp $ */
/* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */
/*-
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
smc91cxx_stop(&sc->sc_smc);
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
{
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)sc;
- pcmcia_function_disable(psc->sc_pf);
-
pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
+ pcmcia_function_disable(psc->sc_pf);
}
-/* $OpenBSD: if_wi.c,v 1.9 2000/03/27 18:34:58 jason Exp $ */
+/* $OpenBSD: if_wi.c,v 1.10 2000/04/24 19:43:36 niklas Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.9 2000/03/27 18:34:58 jason Exp $";
+ "$OpenBSD: if_wi.c,v 1.10 2000/04/24 19:43:36 niklas Exp $";
#endif /* lint */
#ifdef foo
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
wi_stop(sc);
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
-/* $OpenBSD: if_xe.c,v 1.11 2000/02/02 19:09:59 fgsch Exp $ */
+/* $OpenBSD: if_xe.c,v 1.12 2000/04/24 19:43:36 niklas Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, C Stone, Job de Haas
ifp->if_timer = 0;
if (ifp->if_flags & IFF_RUNNING)
xe_stop(&sc->sc_xe);
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_xe.sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
break;
}
splx(s);
-/* $OpenBSD: wdc_pcmcia.c,v 1.8 2000/04/10 07:06:15 csapuntz Exp $ */
+/* $OpenBSD: wdc_pcmcia.c,v 1.9 2000/04/24 19:43:36 niklas Exp $ */
/* $NetBSD: wdc_pcmcia.c,v 1.19 1999/02/19 21:49:43 abs Exp $ */
/*-
s = splbio();
switch (act) {
case DVACT_ACTIVATE:
- sc->sc_ih = pcmcia_intr_establish(sc->sc_pf, IPL_BIO,
- wdcintr, &sc->wdc_channel);
- if (sc->sc_ih == NULL) {
- printf("%s: "
- "couldn't establish interrupt handler\n",
+ if (pcmcia_function_enable(sc->sc_pf)) {
+ printf("%s: couldn't enable PCMCIA function\n",
sc->sc_wdcdev.sc_dev.dv_xname);
rv = EIO;
break;
}
- if (pcmcia_function_enable(sc->sc_pf)) {
- printf("%s: couldn't enable PCMCIA function\n",
+ sc->sc_ih = pcmcia_intr_establish(sc->sc_pf, IPL_BIO,
+ wdcintr, &sc->wdc_channel);
+ if (sc->sc_ih == NULL) {
+ printf("%s: "
+ "couldn't establish interrupt handler\n",
sc->sc_wdcdev.sc_dev.dv_xname);
- pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
rv = EIO;
break;
}
break;
case DVACT_DEACTIVATE:
- pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
rv = wdcactivate(self, act);
break;
}
if (onoff) {
if ((sc->sc_flags & WDC_PCMCIA_ATTACH) == 0) {
+ if (pcmcia_function_enable(sc->sc_pf)) {
+ printf("%s: couldn't enable PCMCIA function\n",
+ sc->sc_wdcdev.sc_dev.dv_xname);
+ return (EIO);
+ }
+
sc->sc_ih = pcmcia_intr_establish(sc->sc_pf, IPL_BIO,
wdcintr, &sc->wdc_channel);
if (sc->sc_ih == NULL) {
printf("%s: "
"couldn't establish interrupt handler\n",
sc->sc_wdcdev.sc_dev.dv_xname);
+ pcmcia_function_disable(sc->sc_pf);
return (EIO);
}
- if (pcmcia_function_enable(sc->sc_pf)) {
- printf("%s: couldn't enable PCMCIA function\n",
- sc->sc_wdcdev.sc_dev.dv_xname);
- pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
- return (EIO);
- }
wdcreset(&sc->wdc_channel, VERBOSE);
}
} else {
- pcmcia_function_disable(sc->sc_pf);
if ((sc->sc_flags & WDC_PCMCIA_ATTACH) == 0)
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ pcmcia_function_disable(sc->sc_pf);
}
return (0);