==== //depot/user/benno/arm/sys/dev/sn/if_sn.c#13 - /home/suleiman/p4/arm/sys/dev/sn/if_sn.c ==== --- /tmp/tmp.10794.0 Sun Jun 4 19:14:32 2006 +++ /home/suleiman/p4/arm/sys/dev/sn/if_sn.c Sun Jun 4 19:13:24 2006 @@ -1002,7 +1018,6 @@ again: snstop(sc); sninit_locked(sc); } - goto again; out: /* @@ -1021,6 +1036,19 @@ out: mask |= CSR_READ_1(sc, INTR_MASK_REG_B); CSR_WRITE_1(sc, INTR_MASK_REG_B, mask); sc->intr_mask = mask; + + /* + * Check the interrupt status register again, now that we have + * unmasked interrupts, to make sure we didn't lose any while they + * were masked. + */ + interrupts = CSR_READ_1(sc, INTR_STAT_REG_B); + if (interrupts & mask) { + /* Looks like we need to do another pass, so mask again */ + CSR_WRITE_1(sc, INTR_MASK_REG_B, 0x00); + goto again; + } + SN_UNLOCK(sc); }