summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2008-10-22 19:53:31 +0000
committerkettenis <kettenis@openbsd.org>2008-10-22 19:53:31 +0000
commit590907c79030b1282c09bd651fe07db6ee05dabe (patch)
tree0eff6707a96213332bebff93d71eba235193c169
parentThis isn't a real structure the firmware understands. (diff)
downloadwireguard-openbsd-590907c79030b1282c09bd651fe07db6ee05dabe.tar.xz
wireguard-openbsd-590907c79030b1282c09bd651fe07db6ee05dabe.zip
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@
-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",