Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pcmcia Stopgap fix: block interrupts in attach routi...



details:   https://anonhg.NetBSD.org/src/rev/a14f375b20fd
branches:  trunk
changeset: 503249:a14f375b20fd
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Feb 03 22:44:23 2001 +0000

description:
Stopgap fix: block interrupts in attach routine until handler is
established.

XXX real fix: make enable/disable for real and invoke them when needed.
XXX This has to wait until the layer 1 <-> layer 2 interface is
XXX restructured.

diffstat:

 sys/dev/pcmcia/pcmcia_isic.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r 4a91db74bce5 -r a14f375b20fd sys/dev/pcmcia/pcmcia_isic.c
--- a/sys/dev/pcmcia/pcmcia_isic.c      Sat Feb 03 22:20:02 2001 +0000
+++ b/sys/dev/pcmcia/pcmcia_isic.c      Sat Feb 03 22:44:23 2001 +0000
@@ -33,7 +33,7 @@
  *     pcmcia_isic.c - pcmcia bus frontend for i4b_isic driver
  *     -------------------------------------------------------
  *
- *     $Id: pcmcia_isic.c,v 1.3 2001/01/19 20:04:07 martin Exp $ 
+ *     $Id: pcmcia_isic.c,v 1.4 2001/02/03 22:44:23 martin Exp $ 
  *
  *      last edit-date: [Fri Jan  5 11:39:32 2001]
  *
@@ -203,10 +203,12 @@
        struct pcmcia_attach_args *pa = aux;
        struct pcmcia_config_entry *cfe;
        const struct isic_pcmcia_card_entry * cde;
+       int s;
 
        /* Which card is it? */
        cde = find_matching_card(pa);
-       if (cde == NULL) return; /* oops - not found?!? */
+       if (cde == NULL)
+               return; /* oops - not found?!? */
 
        psc->sc_pf = pa->pf;
        cfe = pa->pf->cfe_head.sqh_first;
@@ -223,11 +225,17 @@
        /* Announce card name */
        printf(": %s\n", cde->name);
 
+       /* XXX - we generate interrupts during card initialization.
+          Block them for now, until the handler is established. */
+       s = splhigh();
+       
        /* MI initilization */
        pcmcia_isicattach(sc);
 
        /* setup interrupt */
        psc->sc_ih = pcmcia_intr_establish(pa->pf, IPL_NET, isicintr, sc);
+
+       splx(s);
 }
 
 /*---------------------------------------------------------------------------*



Home | Main Index | Thread Index | Old Index