summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2006-11-29 14:05:46 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2006-11-29 14:05:46 +0000
commit98f3aa5c87e4aebd5dbb7130f92bec6afc174665 (patch)
treea420414b9a799794c9560da28122f58c4a90acb8
parent11eb10f7f42596fb4a98bedcc406c41a5bc09b37 (diff)
make interrupt handler stay quiet in case of shared interrupts
-rw-r--r--sys/dev/sdmmc/sdhc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c
index 599a3562ea3..8f6e42960ae 100644
--- a/sys/dev/sdmmc/sdhc.c
+++ b/sys/dev/sdmmc/sdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc.c,v 1.14 2006/11/29 01:46:53 uwe Exp $ */
+/* $OpenBSD: sdhc.c,v 1.15 2006/11/29 14:05:45 uwe Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -849,15 +849,16 @@ sdhc_intr(void *arg)
if (hp == NULL)
continue;
- /* Acknowledge interrupts we are about to handle. */
+ /* Find out which interrupts are pending. */
status = HREAD2(hp, SDHC_NINTR_STATUS);
+ if (!ISSET(status, SDHC_NINTR_STATUS_MASK))
+ continue; /* no interrupt for us */
+
+ /* Acknowledge the interrupts we are about to handle. */
HWRITE2(hp, SDHC_NINTR_STATUS, status);
DPRINTF(2,("%s: interrupt status=%b\n", HDEVNAME(hp),
status, SDHC_NINTR_STATUS_BITS));
- if (!ISSET(status, SDHC_NINTR_STATUS_MASK))
- continue;
-
/* Claim this interrupt. */
done = 1;