Commit 32c5550b authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Move transmitter reset into initisac()

Move some duplicated code into a common and more
sensible place.
parent 3a57312a
...@@ -731,11 +731,8 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -731,11 +731,8 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
inithdlc(cs); inithdlc(cs);
outb(AVM_STATUS0_DIS_TIMER | AVM_STATUS0_RES_TIMER, outb(AVM_STATUS0_DIS_TIMER | AVM_STATUS0_RES_TIMER,
cs->hw.avm.cfg_reg + 2); cs->hw.avm.cfg_reg + 2);
WriteISAC(cs, ISAC_MASK, 0);
outb(AVM_STATUS0_DIS_TIMER | AVM_STATUS0_RES_TIMER | outb(AVM_STATUS0_DIS_TIMER | AVM_STATUS0_RES_TIMER |
AVM_STATUS0_ENA_IRQ, cs->hw.avm.cfg_reg + 2); AVM_STATUS0_ENA_IRQ, cs->hw.avm.cfg_reg + 2);
/* RESET Receiver and Transmitter */
WriteISAC(cs, ISAC_CMDR, 0x41);
return(0); return(0);
case CARD_TEST: case CARD_TEST:
return(0); return(0);
......
...@@ -268,7 +268,4 @@ inithscxisac(struct IsdnCardState *cs) ...@@ -268,7 +268,4 @@ inithscxisac(struct IsdnCardState *cs)
{ {
initisac(cs); initisac(cs);
inithscx(cs); inithscx(cs);
/* RESET Receiver and Transmitter */
cs->writeisac(cs, ISAC_CMDR, 0x41);
} }
...@@ -678,4 +678,7 @@ initisac(struct IsdnCardState *cs) ...@@ -678,4 +678,7 @@ initisac(struct IsdnCardState *cs)
debugl1(cs, "ISAC CIR0 %x", val); debugl1(cs, "ISAC CIR0 %x", val);
cs->dc.isac.ph_state = (val >> 2) & 0xf; cs->dc.isac.ph_state = (val >> 2) & 0xf;
isac_sched_event(cs, D_L1STATECHANGE); isac_sched_event(cs, D_L1STATECHANGE);
/* RESET Receiver and Transmitter */
cs->writeisac(cs, ISAC_CMDR, 0x41);
} }
...@@ -158,10 +158,6 @@ ISurf_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -158,10 +158,6 @@ ISurf_card_msg(struct IsdnCardState *cs, int mt, void *arg)
writeb(0, cs->hw.isurf.isar+ISAR_IRQBIT);mb(); writeb(0, cs->hw.isurf.isar+ISAR_IRQBIT);mb();
initisac(cs); initisac(cs);
initisar(cs); initisar(cs);
/* Reenable ISAC IRQ */
cs->writeisac(cs, ISAC_MASK, 0);
/* RESET Receiver and Transmitter */
cs->writeisac(cs, ISAC_CMDR, 0x41);
return(0); return(0);
case CARD_TEST: case CARD_TEST:
return(0); return(0);
...@@ -179,8 +175,6 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) { ...@@ -179,8 +175,6 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
reset_isurf(cs, ISURF_ISAR_EA | ISURF_ISAC_RESET | reset_isurf(cs, ISURF_ISAR_EA | ISURF_ISAC_RESET |
ISURF_ARCOFI_RESET); ISURF_ARCOFI_RESET);
initisac(cs); initisac(cs);
cs->writeisac(cs, ISAC_MASK, 0);
cs->writeisac(cs, ISAC_CMDR, 0x41);
} }
return(ret); return(ret);
} }
......
...@@ -131,8 +131,6 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -131,8 +131,6 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg)
case CARD_INIT: case CARD_INIT:
inittiger(cs); inittiger(cs);
initisac(cs); initisac(cs);
/* Reenable all IRQ */
cs->writeisac(cs, ISAC_MASK, 0);
return(0); return(0);
case CARD_TEST: case CARD_TEST:
return(0); return(0);
......
...@@ -483,10 +483,6 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -483,10 +483,6 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
ISAR_IRQBIT, 0); ISAR_IRQBIT, 0);
initisac(cs); initisac(cs);
initisar(cs); initisar(cs);
/* Reenable all IRQ */
cs->writeisac(cs, ISAC_MASK, 0);
/* RESET Receiver and Transmitter */
cs->writeisac(cs, ISAC_CMDR, 0x41);
} else { } else {
inithscxisac(cs); inithscxisac(cs);
} }
......
...@@ -243,9 +243,6 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -243,9 +243,6 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg)
case CARD_INIT: case CARD_INIT:
inithfc(cs); inithfc(cs);
initisac(cs); initisac(cs);
/* Reenable all IRQ */
cs->writeisac(cs, ISAC_MASK, 0);
cs->writeisac(cs, ISAC_CMDR, 0x41);
cs->hw.hfc.timer.expires = jiffies + 1; cs->hw.hfc.timer.expires = jiffies + 1;
add_timer(&cs->hw.hfc.timer); add_timer(&cs->hw.hfc.timer);
return(0); return(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment