if (interrupts & ISR_NOIMPL)
warn("interrupt not implemented %#x\n", interrupts);
- interrupts &= ~ISR_NOIMPL;
+ interrupts &= ISR_IMPL;
regs.isr |= interrupts;
if (interrupts & regs.imr) {
if ((regs.isr & regs.imr)) {
Tick when = curTick;
- if (!(regs.isr & regs.imr & ISR_NODELAY))
+ if ((regs.isr & regs.imr & ISR_NODELAY) == 0)
when += intrDelay;
cpuIntrPost(when);
}
postedRxOrn++;
}
- if (regs.isr & regs.imr & (ISR_SWI | ISR_RXIDLE | ISR_RXOK | ISR_RXDESC |
- ISR_TXOK | ISR_TXIDLE | ISR_TXDESC | ISR_RXORN) )
+ if (regs.isr & regs.imr & ISR_IMPL)
postedInterrupts++;
interrupts &= ~ISR_NOIMPL;
#define ISR_RXDESC 0x00000002
#define ISR_RXOK 0x00000001
#define ISR_ALL 0x7FFFFFFF
-#define ISR_NODELAY (ISR_ALL & ~(ISR_RXOK|ISR_RXDESC|ISR_TXOK|ISR_TXDESC))
-#define ISR_NOIMPL (~(ISR_SWI|ISR_TXIDLE|ISR_TXDESC|ISR_TXOK|ISR_RXORN| \
- ISR_RXIDLE|ISR_RXDESC|ISR_RXOK))
+#define ISR_DELAY (ISR_TXIDLE|ISR_TXDESC|ISR_TXOK| \
+ ISR_RXIDLE|ISR_RXDESC|ISR_RXOK)
+#define ISR_NODELAY (ISR_ALL & ~ISR_DELAY)
+#define ISR_IMPL (ISR_SWI|ISR_TXIDLE|ISR_TXDESC|ISR_TXOK|ISR_RXORN| \
+ ISR_RXIDLE|ISR_RXDESC|ISR_RXOK)
+#define ISR_NOIMPL (ISR_ALL & ~ISR_IMPL)
/* transmit configuration register */
#define TX_CFG_CSI 0x80000000