diff options
| author | christos <christos@NetBSD.org> | 2001-12-24 12:07:27 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2001-12-24 12:07:27 +0000 |
| commit | 6e8072d6072ccbcbcf1ac5bfd1aad8e52c10b096 (patch) | |
| tree | 6e5e8b9338458baf8375dd889d5b67704418a561 /sys/dev | |
| parent | 6894058edf838e16203b15c7386c5280699caff4 (diff) | |
enable the card before trying to establish an interrupt because we need the
ccr mapped on multi-function cards.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pcmcia/com_pcmcia.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c index c54740ceb94..0fa9b60cb0c 100644 --- a/sys/dev/pcmcia/com_pcmcia.c +++ b/sys/dev/pcmcia/com_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_pcmcia.c,v 1.24 2001/12/24 09:30:40 christos Exp $ */ +/* $NetBSD: com_pcmcia.c,v 1.25 2001/12/24 12:07:27 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com_pcmcia.c,v 1.24 2001/12/24 09:30:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_pcmcia.c,v 1.25 2001/12/24 12:07:27 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -326,15 +326,20 @@ com_pcmcia_enable(sc) { struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc; struct pcmcia_function *pf = psc->sc_pf; + int error; + + if ((error = com_pcmcia_enable1(sc)) != 0) + return error; /* establish the interrupt. */ psc->sc_ih = pcmcia_intr_establish(pf, IPL_SERIAL, comintr, sc); if (psc->sc_ih == NULL) { printf("%s: couldn't establish interrupt\n", sc->sc_dev.dv_xname); + com_pcmcia_disable1(sc); return 1; } - return com_pcmcia_enable1(sc); + return 0; } int |
