Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pcmcia Don't establish an interrupt if attach is in ...
details: https://anonhg.NetBSD.org/src/rev/7eb8a41768c3
branches: trunk
changeset: 482753:7eb8a41768c3
user: enami <enami%NetBSD.org@localhost>
date: Mon Feb 21 03:55:22 2000 +0000
description:
Don't establish an interrupt if attach is in progress. Anyway, current wdc
and its children doesn't require interrupt on attach.
diffstat:
sys/dev/pcmcia/wdc_pcmcia.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diffs (47 lines):
diff -r b5d4ff98c118 -r 7eb8a41768c3 sys/dev/pcmcia/wdc_pcmcia.c
--- a/sys/dev/pcmcia/wdc_pcmcia.c Mon Feb 21 03:26:41 2000 +0000
+++ b/sys/dev/pcmcia/wdc_pcmcia.c Mon Feb 21 03:55:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_pcmcia.c,v 1.30 2000/02/05 04:41:49 enami Exp $ */
+/* $NetBSD: wdc_pcmcia.c,v 1.31 2000/02/21 03:55:22 enami Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -406,17 +406,18 @@
struct wdc_pcmcia_softc *sc = arg;
if (onoff) {
- /* Establish the interrupt handler. */
- 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);
- return (EIO);
- }
-
/* See the comment in aic_pcmcia_enable */
if ((sc->sc_flags & WDC_PCMCIA_ATTACH) == 0) {
+ /* Establish the interrupt handler. */
+ 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);
+ return (EIO);
+ }
+
if (pcmcia_function_enable(sc->sc_pf)) {
printf("%s: couldn't enable PCMCIA function\n",
sc->sc_wdcdev.sc_dev.dv_xname);
@@ -427,7 +428,8 @@
}
} else {
pcmcia_function_disable(sc->sc_pf);
- pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ if ((sc->sc_flags & WDC_PCMCIA_ATTACH) == 0)
+ pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
}
return (0);
Home |
Main Index |
Thread Index |
Old Index