diff options
author | se <se@FreeBSD.org> | 1995-02-09 20:16:19 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1995-02-09 20:16:19 +0000 |
commit | cf143514eee5ff97ca1bcf31b5a289c48a66e625 (patch) | |
tree | adf555c7bf085b4761d02937d5c5f82c2bf242f1 /sys/i386/pci | |
parent | 5c099a964cd841f148168497cd77214c6f443fd0 (diff) | |
download | FreeBSD-src-cf143514eee5ff97ca1bcf31b5a289c48a66e625.zip FreeBSD-src-cf143514eee5ff97ca1bcf31b5a289c48a66e625.tar.gz |
Initialisation of interrupt masks changed.
Reviewed by: se
Submitted by: wolf (Wolfgang Stanglmeier)
Diffstat (limited to 'sys/i386/pci')
-rw-r--r-- | sys/i386/pci/pci_bus.c | 9 | ||||
-rw-r--r-- | sys/i386/pci/pci_cfgreg.c | 9 | ||||
-rw-r--r-- | sys/i386/pci/pci_pir.c | 9 |
3 files changed, 15 insertions, 12 deletions
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c index 5b7f8dd..25356bc 100644 --- a/sys/i386/pci/pci_bus.c +++ b/sys/i386/pci/pci_bus.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcibus.c,v 1.5 1994/10/12 02:33:21 se Exp $ +** $Id: pcibus.c,v 1.1 1995/02/01 23:06:58 se Exp $ ** ** pci bus subroutines for i386 architecture. ** @@ -393,7 +393,7 @@ static unsigned int pci_int_mask [16]; int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) { int irq; - unsigned mask; + unsigned mask, oldmask; irq = PCI_INTERRUPT_LINE_EXTRACT( pci_conf_read (tag, PCI_INTERRUPT_REG)); @@ -402,6 +402,7 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) if (!maskptr) maskptr = &pci_int_mask[irq]; + oldmask = *maskptr; INTRMASK (*maskptr, mask); @@ -425,13 +426,13 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) ** update the isa interrupt masks. */ for (mp=&intr_mask[0]; mp<&intr_mask[ICU_LEN]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; /* ** update the pci interrupt masks. */ for (mp=&pci_int_mask[0]; mp<&pci_int_mask[16]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; }; #endif diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c index 5b7f8dd..25356bc 100644 --- a/sys/i386/pci/pci_cfgreg.c +++ b/sys/i386/pci/pci_cfgreg.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcibus.c,v 1.5 1994/10/12 02:33:21 se Exp $ +** $Id: pcibus.c,v 1.1 1995/02/01 23:06:58 se Exp $ ** ** pci bus subroutines for i386 architecture. ** @@ -393,7 +393,7 @@ static unsigned int pci_int_mask [16]; int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) { int irq; - unsigned mask; + unsigned mask, oldmask; irq = PCI_INTERRUPT_LINE_EXTRACT( pci_conf_read (tag, PCI_INTERRUPT_REG)); @@ -402,6 +402,7 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) if (!maskptr) maskptr = &pci_int_mask[irq]; + oldmask = *maskptr; INTRMASK (*maskptr, mask); @@ -425,13 +426,13 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) ** update the isa interrupt masks. */ for (mp=&intr_mask[0]; mp<&intr_mask[ICU_LEN]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; /* ** update the pci interrupt masks. */ for (mp=&pci_int_mask[0]; mp<&pci_int_mask[16]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; }; #endif diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index 5b7f8dd..25356bc 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcibus.c,v 1.5 1994/10/12 02:33:21 se Exp $ +** $Id: pcibus.c,v 1.1 1995/02/01 23:06:58 se Exp $ ** ** pci bus subroutines for i386 architecture. ** @@ -393,7 +393,7 @@ static unsigned int pci_int_mask [16]; int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) { int irq; - unsigned mask; + unsigned mask, oldmask; irq = PCI_INTERRUPT_LINE_EXTRACT( pci_conf_read (tag, PCI_INTERRUPT_REG)); @@ -402,6 +402,7 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) if (!maskptr) maskptr = &pci_int_mask[irq]; + oldmask = *maskptr; INTRMASK (*maskptr, mask); @@ -425,13 +426,13 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) ** update the isa interrupt masks. */ for (mp=&intr_mask[0]; mp<&intr_mask[ICU_LEN]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; /* ** update the pci interrupt masks. */ for (mp=&pci_int_mask[0]; mp<&pci_int_mask[16]; mp++) - if (*mp & *maskptr) + if ((~*mp & oldmask)==0) *mp |= mask; }; #endif |