Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/isa only enable interrupts from the controller if th...
details: https://anonhg.NetBSD.org/src/rev/0b9b7af63f90
branches: trunk
changeset: 481713:0b9b7af63f90
user: chopps <chopps%NetBSD.org@localhost>
date: Fri Feb 04 08:42:47 2000 +0000
description:
only enable interrupts from the controller if the socket is enabled
diffstat:
sys/dev/isa/i82365_isasubr.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (44 lines):
diff -r 3038d25d6419 -r 0b9b7af63f90 sys/dev/isa/i82365_isasubr.c
--- a/sys/dev/isa/i82365_isasubr.c Fri Feb 04 08:42:07 2000 +0000
+++ b/sys/dev/isa/i82365_isasubr.c Fri Feb 04 08:42:47 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82365_isasubr.c,v 1.9 2000/02/04 05:30:55 chopps Exp $ */
+/* $NetBSD: i82365_isasubr.c,v 1.10 2000/02/04 08:42:47 chopps Exp $ */
#define PCICISADEBUG
@@ -469,12 +469,13 @@
if ((ih = isa_intr_establish(ic, irq, ist, ipl, fct, arg)) == NULL)
return (NULL);
- reg = pcic_read(h, PCIC_INTR);
- reg &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
- reg |= irq;
- pcic_write(h, PCIC_INTR, reg);
-
h->ih_irq = irq;
+ if (h->flags & PCIC_FLAG_ENABLED) {
+ reg = pcic_read(h, PCIC_INTR);
+ reg &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
+ reg |= irq;
+ pcic_write(h, PCIC_INTR, reg);
+ }
printf("%s: card irq %d\n", h->pcmcia->dv_xname, irq);
@@ -492,10 +493,10 @@
int reg;
h->ih_irq = 0;
-
- reg = pcic_read(h, PCIC_INTR);
- reg &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
- pcic_write(h, PCIC_INTR, reg);
-
+ if (h->flags & PCIC_FLAG_ENABLED) {
+ reg = pcic_read(h, PCIC_INTR);
+ reg &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
+ pcic_write(h, PCIC_INTR, reg);
+ }
isa_intr_disestablish(ic, ih);
}
Home |
Main Index |
Thread Index |
Old Index