void hscx_int_main(struct IsdnCardState *cs, u8 val) { u8 exval; struct BCState *bcs; if (val & 0x01) { bcs = cs->bcs + 1; exval = hscx_read(bcs, HSCX_EXIR); if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX B EXIR %x", exval); if (exval & 0x40) { xmit_xdu_b(bcs, reset_xmit); } } if (val & 0xf8) { if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX B interrupt %x", val); hscx_interrupt(cs, val, 1); } if (val & 0x02) { bcs = cs->bcs; exval = hscx_read(bcs, HSCX_EXIR); if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX A EXIR %x", exval); if (exval & 0x40) { xmit_xdu_b(bcs, reset_xmit); } } if (val & 0x04) { bcs = cs->bcs; exval = hscx_read(bcs, HSCX_ISTA); if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX A interrupt %x", exval); hscx_interrupt(cs, exval, 0); } }
static inline void hscx_int_main(struct IsdnCardState *cs, u_char val) { u_char exval; struct BCState *bcs; if (val & 0x01) { bcs = cs->bcs + 1; exval = READHSCX(cs, 1, HSCX_EXIR); if (exval & 0x40) { if (bcs->mode == 1) hscx_fill_fifo(bcs); else { #ifdef ERROR_STATISTIC bcs->err_tx++; #endif /* Here we lost an TX interrupt, so * restart transmitting the whole frame. */ if (bcs->tx_skb) { skb_push(bcs->tx_skb, bcs->hw.hscx.count); bcs->tx_cnt += bcs->hw.hscx.count; bcs->hw.hscx.count = 0; } WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x01); if (cs->debug & L1_DEB_WARN) debugl1(cs, "HSCX B EXIR %x Lost TX", exval); } } else if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX B EXIR %x", exval); } if (val & 0xf8) { if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX B interrupt %x", val); hscx_interrupt(cs, val, 1); } if (val & 0x02) { bcs = cs->bcs; exval = READHSCX(cs, 0, HSCX_EXIR); if (exval & 0x40) { if (bcs->mode == L1_MODE_TRANS) hscx_fill_fifo(bcs); else { /* Here we lost an TX interrupt, so * restart transmitting the whole frame. */ #ifdef ERROR_STATISTIC bcs->err_tx++; #endif if (bcs->tx_skb) { skb_push(bcs->tx_skb, bcs->hw.hscx.count); bcs->tx_cnt += bcs->hw.hscx.count; bcs->hw.hscx.count = 0; } WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x01); if (cs->debug & L1_DEB_WARN) debugl1(cs, "HSCX A EXIR %x Lost TX", exval); } } else if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX A EXIR %x", exval); } if (val & 0x04) { exval = READHSCX(cs, 0, HSCX_ISTA); if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX A interrupt %x", exval); hscx_interrupt(cs, exval, 0); } }