Dang, I lost the sign in that brucification. DTRT with PCATCH.
Cut Out In Cardboard by: bde
This commit is contained in:
parent
a9ee73f55c
commit
a1f0ac133e
@ -371,7 +371,7 @@ init_card(struct csoftc *csc)
|
||||
|
||||
csc->state = C_INIT;
|
||||
csc->reg->srd = 0x100;
|
||||
tsleep(csc, PZERO + PCATCH, "icard", hz / 10);
|
||||
tsleep(csc, PZERO | PCATCH, "icard", hz / 10);
|
||||
csc->reg->gbp = vtophys(csc->ram);
|
||||
csc->ram->glcd = 0x3f30; /* XXX: designer magic */
|
||||
|
||||
@ -380,7 +380,7 @@ init_card(struct csoftc *csc)
|
||||
csc->ram->dacbp = 0; /* 32bit only */
|
||||
|
||||
csc->reg->srd = csc->serial[0].last = 0x400;
|
||||
tsleep(&csc->serial[0].last, PZERO + PCATCH, "con1", hz);
|
||||
tsleep(&csc->serial[0].last, PZERO | PCATCH, "con1", hz);
|
||||
timeout(poke_847x, NULL, 1);
|
||||
csc->state = C_RUNNING;
|
||||
}
|
||||
@ -392,7 +392,7 @@ init_ctrl(struct softc *sc)
|
||||
|
||||
printf("init_ctrl(%p) [%s] [%08x]\n", sc, sc->nodename, sc->csc->reg->glcd);
|
||||
init_8370(sc);
|
||||
tsleep(sc, PZERO + PCATCH, "ds8370", hz);
|
||||
tsleep(sc, PZERO | PCATCH, "ds8370", hz);
|
||||
printf("%s: glcd: [%08x]\n", sc->nodename, sc->csc->reg->glcd);
|
||||
sc->reg->gbp = vtophys(sc->ram);
|
||||
sc->ram->grcd = 0x00000001; /* RXENBL */
|
||||
@ -423,9 +423,9 @@ init_ctrl(struct softc *sc)
|
||||
sc->ram->rtsm[i] = 0;
|
||||
}
|
||||
sc->reg->srd = sc->last = 0x500;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con1", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con1", hz);
|
||||
sc->reg->srd = sc->last = 0x520;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con1", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con1", hz);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -907,7 +907,7 @@ musycc_config(node_p node, char *set, char *ret)
|
||||
if (csc->state == C_IDLE)
|
||||
init_card(csc);
|
||||
while (csc->state != C_RUNNING)
|
||||
tsleep(&csc->state, PZERO + PCATCH, "crun", hz/10);
|
||||
tsleep(&csc->state, PZERO | PCATCH, "crun", hz/10);
|
||||
if (set != NULL) {
|
||||
if (!strncmp(set, "line ", 5)) {
|
||||
wframing = sc->framing;
|
||||
@ -1047,7 +1047,7 @@ musycc_newhook(node_p node, hook_p hook, const char *name)
|
||||
csc = sc->csc;
|
||||
|
||||
while (csc->state != C_RUNNING)
|
||||
tsleep(&csc->state, PZERO + PCATCH, "crun", hz/10);
|
||||
tsleep(&csc->state, PZERO | PCATCH, "crun", hz/10);
|
||||
|
||||
if (sc->framing == WHOKNOWS)
|
||||
return (EINVAL);
|
||||
@ -1202,7 +1202,7 @@ musycc_connect(hook_p hook)
|
||||
ch = sch->chan;
|
||||
|
||||
while (csc->state != C_RUNNING)
|
||||
tsleep(&csc->state, PZERO + PCATCH, "crun", hz/10);
|
||||
tsleep(&csc->state, PZERO | PCATCH, "crun", hz/10);
|
||||
|
||||
if (sch->state == UP)
|
||||
return (0);
|
||||
@ -1235,9 +1235,9 @@ musycc_connect(hook_p hook)
|
||||
|
||||
/* Reread the Time Slot Map */
|
||||
sc->reg->srd = sc->last = 0x1800;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con1", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con1", hz);
|
||||
sc->reg->srd = sc->last = 0x1820;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con2", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con2", hz);
|
||||
|
||||
/* Set the channel mode */
|
||||
sc->ram->tcct[ch] = 0x2800; /* HDLC-FCS16 | MAXSEL[2] */
|
||||
@ -1254,9 +1254,9 @@ musycc_connect(hook_p hook)
|
||||
|
||||
/* Reread the Channel Configuration Descriptor for this channel */
|
||||
sc->reg->srd = sc->last = 0x0b00 + ch;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con3", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con3", hz);
|
||||
sc->reg->srd = sc->last = 0x0b20 + ch;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con4", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con4", hz);
|
||||
|
||||
/*
|
||||
* Figure out how many receive buffers we want: 10 + nts * 2
|
||||
@ -1311,9 +1311,9 @@ musycc_connect(hook_p hook)
|
||||
|
||||
/* Activate the Channel */
|
||||
sc->reg->srd = sc->last = 0x0800 + ch;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con4", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con4", hz);
|
||||
sc->reg->srd = sc->last = 0x0820 + ch;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con3", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con3", hz);
|
||||
NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook));
|
||||
|
||||
return (0);
|
||||
@ -1343,13 +1343,13 @@ musycc_disconnect(hook_p hook)
|
||||
ch = sch->chan;
|
||||
|
||||
while (csc->state != C_RUNNING)
|
||||
tsleep(&csc->state, PZERO + PCATCH, "crun", hz/10);
|
||||
tsleep(&csc->state, PZERO | PCATCH, "crun", hz/10);
|
||||
|
||||
/* Deactivate the channel */
|
||||
sc->reg->srd = sc->last = 0x0900 + sch->chan;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con3", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con3", hz);
|
||||
sc->reg->srd = sc->last = 0x0920 + sch->chan;
|
||||
tsleep(&sc->last, PZERO + PCATCH, "con4", hz);
|
||||
tsleep(&sc->last, PZERO | PCATCH, "con4", hz);
|
||||
|
||||
if (sch->state == DOWN)
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user