diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2006-11-29 14:05:46 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2006-11-29 14:05:46 +0000 |
commit | 98f3aa5c87e4aebd5dbb7130f92bec6afc174665 (patch) | |
tree | a420414b9a799794c9560da28122f58c4a90acb8 | |
parent | 11eb10f7f42596fb4a98bedcc406c41a5bc09b37 (diff) |
make interrupt handler stay quiet in case of shared interrupts
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 11 |
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; |