| plan 9 kernel history: overview | file list | diff list |
1992/0502/pc/devether.c (diff list | history)
| 1992/0501/sys/src/9/pc/devether.c:475,481 – 1992/0502/sys/src/9/pc/devether.c:475,481 (short | long | prev | next) | ||
| 1992/0424 | rb = &cp->rb[cp->rh]; | |
| 1992/0501 | etherup(cp, rb->pkt, rb->len); | |
| 1992/0424 | rb->owner = Interface; | |
| 1992/0502 | cp->rh = NEXT(cp->rh, cp->nrb); | |
| 1992/0424 | } | |
| 1992/0410 | ||
| 1992/0424 | qunlock(&cp->rlock); | |
| 1992/0501/sys/src/9/pc/devether.c:614,623 – 1992/0502/sys/src/9/pc/devether.c:614,623 | ||
| 1992/0424 | int i; uchar msr; | |
| 1992/0403 | ||
| 1992/0501 |
| |
| 1992/0424 |
| |
| 1992/0501 | cp->rb = ialloc(sizeof(Buffer)*Nrb, 1); cp->nrb = Nrb; | |
| 1992/0502 | cp->tb = ialloc(sizeof(Buffer)*Ntb, 1); cp->ntb = Ntb; | |
| 1992/0424 | msr = IN(hw, msr); OUT(hw, msr, 0x40|msr); | |
| 1992/0501/sys/src/9/pc/devether.c:684,691 – 1992/0502/sys/src/9/pc/devether.c:684,689 | ||
| 1992/0424 | OUT(cp->hw, w.tcr, 0); | |
| 1992/0403 | } | |
| 1992/0501 |
| |
| 1992/0424 | static void wd8013receive(Ctlr *cp) | |
| 1992/0403 | { | |
| 1992/0501/sys/src/9/pc/devether.c:708,733 – 1992/0502/sys/src/9/pc/devether.c:706,727 | ||
| 1992/0424 | cp->inpackets++; p = &((Ring*)hw->ram)[next]; | |
| 1992/0501 | len = (p->len1<<8)|p->len0-4; | |
| 1992/0424 | rb = &cp->rb[cp->ri]; if(rb->owner == Interface){ | |
| 1992/0501 | rb->len = len; | |
| 1992/0424 |
| |
| 1992/0501 |
| |
| 1992/0502 | if((p->data+len) >= (hw->ram+hw->size)){ | |
| 1992/0501 | len = hw->ram+hw->size - p->data; memmove(rb->pkt+len, &((Ring*)hw->ram)[hw->pstart], | |
| 1992/0502 | (p->data+rb->len) - (hw->ram+hw->size)); | |
| 1992/0425 | } | |
| 1992/0501 | memmove(rb->pkt, p->data, len); | |
| 1992/0424 | rb->owner = Host; | |
| 1992/0502 | cp->ri = NEXT(cp->ri, cp->nrb); | |
| 1992/0424 | } | |
| 1992/0501 |
| |
| 1992/0502 | p->status = 0; | |
| 1992/0424 | next = p->next; bnry = next-1; | |
| 1992/0501 | if(bnry < hw->pstart) | |
| 1992/0501/sys/src/9/pc/devether.c:747,753 – 1992/0502/sys/src/9/pc/devether.c:741,746 | ||
| 1992/0424 | tb = &cp->tb[cp->ti]; if(tb->busy == 0 && tb->owner == Interface){ hw = cp->hw; | |
| 1992/0501 |
| |
| 1992/0424 | OUT(hw, w.tbcr0, tb->len & 0xFF); OUT(hw, w.tbcr1, (tb->len>>8) & 0xFF); | |
| 1992/0501/sys/src/9/pc/devether.c:785,791 – 1992/0502/sys/src/9/pc/devether.c:778,784 | ||
| 1992/0424 | tb = &cp->tb[cp->ti]; tb->owner = Host; tb->busy = 0; | |
| 1992/0502 | cp->ti = NEXT(cp->ti, cp->ntb); | |
| 1992/0424 | (*cp->hw->transmit)(cp); wakeup(&cp->tr); } | |
| 1992/0501/sys/src/9/pc/devether.c:820,841 – 1992/0502/sys/src/9/pc/devether.c:813,816 | ||
| 1992/0409 | void | |
| 1992/0411 | consdebug(void) | |
| 1992/0409 | { | |
| 1992/0501 |
| |
| 1992/0403 | } | |