Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Duh, 0 bits enable interrupts in the IPAC!



details:   https://anonhg.NetBSD.org/src/rev/ae6317a6cce2
branches:  trunk
changeset: 525840:ae6317a6cce2
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 18 15:32:30 2002 +0000

description:
Duh, 0 bits enable interrupts in the IPAC!
So to disable them all better use 0xff instead of 0x00 as mask. Noted
by Matthias Drochner.

Move some initialization unrelated to interrupts back to its place at
attach time.

diffstat:

 sys/dev/pci/isic_pci_elsa_qs1p.c |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (57 lines):

diff -r bb0422a8f586 -r ae6317a6cce2 sys/dev/pci/isic_pci_elsa_qs1p.c
--- a/sys/dev/pci/isic_pci_elsa_qs1p.c  Thu Apr 18 15:31:51 2002 +0000
+++ b/sys/dev/pci/isic_pci_elsa_qs1p.c  Thu Apr 18 15:32:30 2002 +0000
@@ -27,14 +27,14 @@
  *     isic - I4B Siemens ISDN Chipset Driver for ELSA Quickstep 1000pro PCI
  *     =====================================================================
  *
- *     $Id: isic_pci_elsa_qs1p.c,v 1.7 2002/04/17 17:35:29 martin Exp $
+ *     $Id: isic_pci_elsa_qs1p.c,v 1.8 2002/04/18 15:32:30 martin Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:58 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_pci_elsa_qs1p.c,v 1.7 2002/04/17 17:35:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_pci_elsa_qs1p.c,v 1.8 2002/04/18 15:32:30 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -456,8 +456,13 @@
        sc->sc_ipac = 1;
        sc->sc_bfifolen = IPAC_BFIFO_LEN;
 
+       IPAC_WRITE(IPAC_ACFG, 0);       /* outputs are open drain */
+       IPAC_WRITE(IPAC_AOE,            /* aux 5..2 are inputs, 7, 6 outputs */
+               (IPAC_AOE_OE5 | IPAC_AOE_OE4 | IPAC_AOE_OE3 | IPAC_AOE_OE2));
+       IPAC_WRITE(IPAC_ATX, ELSA_NO_LED);      /* set all output lines high */
+
        /* disable any interrupts */
-       IPAC_WRITE(IPAC_MASK, 0);
+       IPAC_WRITE(IPAC_MASK, 0xff);
         bus_space_write_1(sc->sc_maps[0].t, sc->sc_maps[0].h, 0x4c, 0x01);
 }
 
@@ -472,12 +477,6 @@
                s = splnet();
                /* enable hscx/isac irq's */
                IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
-
-               IPAC_WRITE(IPAC_ACFG, 0);       /* outputs are open drain */
-               IPAC_WRITE(IPAC_AOE,            /* aux 5..2 are inputs, 7, 6 outputs */
-                       (IPAC_AOE_OE5 | IPAC_AOE_OE4 | IPAC_AOE_OE3 | IPAC_AOE_OE2));
-               IPAC_WRITE(IPAC_ATX, ELSA_NO_LED);      /* set all output lines high */
-
                bus_space_write_1(sc->sc_maps[0].t, sc->sc_maps[0].h, 0x4c, 0x41);      /* enable card interrupt */
                splx(s);
                break;
@@ -485,7 +484,7 @@
                s = splnet();
                callout_stop(&sc->sc_driver_callout);
                IPAC_WRITE(IPAC_ATX, ELSA_NO_LED);
-               IPAC_WRITE(IPAC_MASK, 0);
+               IPAC_WRITE(IPAC_MASK, 0xff);
                bus_space_write_1(sc->sc_maps[0].t, sc->sc_maps[0].h, 0x4c, 0x01);
                splx(s);
                break;



Home | Main Index | Thread Index | Old Index