diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-12-07 10:31:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-12-07 10:31:32 +0000 |
commit | b662fef569e99603e6131405e55518e9e28d59c1 (patch) | |
tree | cd8a0bab763a2b5b08c1e94bbcf75ce65dba7054 /sys | |
parent | c1b614167fe799d2d3849484a7babbd1050df92e (diff) |
Make sure we only return 1 from the interrupt handler if the interrupt
actually was for us. Fixes problems when the interrupt is shared.
tested by stu@, ok mikeb@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/esa.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index dff77f9bf3f..c41deecd698 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.23 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: esa.c,v 1.24 2011/12/07 10:31:31 kettenis Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -874,7 +874,7 @@ esa_intr(void *hdl) u_int32_t diff; u_int32_t play_blksize, play_bufsize; u_int32_t rec_blksize, rec_bufsize; - int i; + int i, claimed = 0; status = bus_space_read_1(iot, ioh, ESA_HOST_INT_STATUS); if (status == 0xff) @@ -901,6 +901,7 @@ esa_intr(void *hdl) break; } bus_space_write_1(iot, ioh, ESA_HW_VOL_COUNTER_MASTER, 0x88); + claimed = 1; } if (status & ESA_ASSP_INT_PENDING) { @@ -945,9 +946,10 @@ esa_intr(void *hdl) } } } + claimed = 1; } - return (1); + return (claimed); } int |