Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pcmcia Backout previous. While it fixes half of the ...
details: https://anonhg.NetBSD.org/src/rev/18d4262befda
branches: trunk
changeset: 524827:18d4262befda
user: martin <martin%NetBSD.org@localhost>
date: Sun Mar 31 13:27:32 2002 +0000
description:
Backout previous. While it fixes half of the problem for me, it is not
the right fix.
diffstat:
sys/dev/pcmcia/wdc_pcmcia.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diffs (57 lines):
diff -r a6987c5feafc -r 18d4262befda sys/dev/pcmcia/wdc_pcmcia.c
--- a/sys/dev/pcmcia/wdc_pcmcia.c Sun Mar 31 12:58:54 2002 +0000
+++ b/sys/dev/pcmcia/wdc_pcmcia.c Sun Mar 31 13:27:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_pcmcia.c,v 1.47 2002/03/31 07:19:03 martin Exp $ */
+/* $NetBSD: wdc_pcmcia.c,v 1.48 2002/03/31 13:27:32 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.47 2002/03/31 07:19:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.48 2002/03/31 13:27:32 martin Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -452,18 +452,18 @@
struct wdc_pcmcia_softc *sc = (void *)self;
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);
@@ -474,7 +474,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