From bb83e7583e8d9bbe7e26b0eee30bfd2cc103c665 Mon Sep 17 00:00:00 2001 From: Gary Jennejohn Date: Tue, 23 Apr 2002 10:25:35 +0000 Subject: [PATCH] On slow machines interrupts could be lost, so check for pending interrupts in a loop. Tested by: Andrew Gordon --- sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c | 29 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c b/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c index 981473bc4c8..fc702317708 100644 --- a/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c +++ b/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c @@ -974,18 +974,25 @@ avma1pp2_intr(void *xsc) /* was there an interrupt from this card ? */ if ((stat & ASL_IRQ_Pending) == 0) return; /* no */ - /* interrupts are high active */ - if (stat & ASL_IRQ_TIMER) - NDBGL1(L1_H_IRQ, "timer interrupt ???"); - if (stat & ASL_IRQ_HSCX) + /* For slow machines loop as long as an interrupt is active */ + for (; ((stat & ASL_IRQ_Pending) != 0) ;) { - NDBGL1(L1_H_IRQ, "HSCX"); - avma1pp2_hscx_int_handler(sc); - } - if (stat & ASL_IRQ_ISAC) - { - NDBGL1(L1_H_IRQ, "ISAC"); - ifpi2_isacsx_intr(sc); + /* interrupts are high active */ + if (stat & ASL_IRQ_TIMER) + NDBGL1(L1_H_IRQ, "timer interrupt ???"); + if (stat & ASL_IRQ_HSCX) + { + NDBGL1(L1_H_IRQ, "HSCX"); + avma1pp2_hscx_int_handler(sc); + } + if (stat & ASL_IRQ_ISAC) + { + NDBGL1(L1_H_IRQ, "ISAC"); + ifpi2_isacsx_intr(sc); + } + stat = bus_space_read_1(btag, bhandle, STAT0_OFFSET); + NDBGL1(L1_H_IRQ, "stat %x", stat); + } }