summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-10-22 19:53:32 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-10-22 19:53:32 +0000
commit31342e670dbd2c4c140b73ecadbee90e33185c74 (patch)
treebace67ad3c48b2062892248b804129313e9e902d /sys
parent20c5eb52dc8e179b6e40743570ef0114c35659f2 (diff)
Only call pic->pic_delroute() when disestablishing the last interrupt handler
for a pin. Resolves issues with azalia(4) devices that have no usable codecs when they share an interrupt pin with other devices. ok weingart@, krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/intr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c
index 6756c90b6fe..04969b9043b 100644
--- a/sys/arch/amd64/amd64/intr.c
+++ b/sys/arch/amd64/amd64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.18 2008/10/09 18:35:38 chl Exp $ */
+/* $OpenBSD: intr.c,v 1.19 2008/10/22 19:53:31 kettenis Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
@@ -515,8 +515,10 @@ intr_disestablish(struct intrhand *ih)
*p = q->ih_next;
intr_calculatemasks(ci);
- pic->pic_delroute(pic, ci, ih->ih_pin, idtvec, source->is_type);
- pic->pic_hwunmask(pic, ih->ih_pin);
+ if (source->is_handlers == NULL)
+ pic->pic_delroute(pic, ci, ih->ih_pin, idtvec, source->is_type);
+ else
+ pic->pic_hwunmask(pic, ih->ih_pin);
#ifdef INTRDEBUG
printf("cpu%u: remove slot %d (pic %s pin %d vec %d)\n",