~kris/9p

9hist

e9d8560cf71d71fe59524ad78143d41632230838 — David du Colombier 31 years ago 92f151f
Plan 9 from Bell Labs 1995-08-01
3 files changed, 16 insertions(+), 6 deletions(-)

M pc/devether.c
M pc/ether509.c
M pc/ether8390.c
M pc/devether.c => pc/devether.c +7 -5
@@ 104,7 104,7 @@ etherrloop(Ether *ctlr, Etherpkt *pkt, long len)
{
	Block *bp;
	ushort type;
	int i;
	int i, n;
	Netfile *f, **fp, **ep;

	type = (pkt->type[0]<<8)|pkt->type[1];


@@ 117,12 117,14 @@ etherrloop(Ether *ctlr, Etherpkt *pkt, long len)
			} else {
				if(qwindow(f->in) <= 0)
					continue;
				if(len > 60)
					len = 60;
				bp = iallocb(len);
				if(len > 64)
					n = 64;
				else
					n = len;
				bp = iallocb(n);
				if(bp == 0)
					continue;
				memmove(bp->wp, pkt->d, len);
				memmove(bp->wp, pkt->d, n);
				i = TK2MS(m->ticks);
				bp->wp[58] = len>>8;
				bp->wp[59] = len;

M pc/ether509.c => pc/ether509.c +5 -1
@@ 113,6 113,7 @@ static void
attach(Ether *ether)
{
	ulong port;
	int x;

	port = ether->port;
	/*


@@ 124,7 125,10 @@ attach(Ether *ether)
	 * we will also see TxAvailable interrupts.
	 * Disable Update interrupts for now.
	 */
	COMMAND(port, SetRxFilter, Broadcast|MyEtherAddr);
	x = Broadcast|MyEtherAddr;
	if(ether->prom)
		x |= Promiscuous;
	COMMAND(port, SetRxFilter, x);
	COMMAND(port, SetReadZeroMask, (AllIntr|Latch) & ~Update);
	COMMAND(port, SetIntrMask, (AllIntr|Latch) & ~Update);
	COMMAND(port, RxEnable, 0);

M pc/ether8390.c => pc/ether8390.c +4 -0
@@ 646,6 646,7 @@ static void
attach(Ether *ether)
{
	Dp8390 *dp8390 = ether->ctlr;
	int x;

	/*
	 * Enable the chip for transmit/receive.


@@ 653,6 654,9 @@ attach(Ether *ether)
	 * mode. Clear the missed-packet counter, it
	 * increments while in monitor mode.
	 */
	x = Ab;
	if(ether->prom)
		x |= Pro;
	slowoutb(dp8390->dp8390+Rcr, Ab);
	slowinb(dp8390->dp8390+Cntr2);
}