plan 9 kernel history: overview | file list | diff list

1993/1219/carrera/devether.c (diff list | history)

1993/1218/sys/src/9/carrera/devether.c:15,221993/1219/sys/src/9/carrera/devether.c:15,22 (short | long | prev | next)
1993/0903    
 
1993/0904    
#define SONICADDR	((Sonic*)Sonicbase) 
1993/0903    
 
1993/1218    
#define RD(rn)		(sncdly(), *(ulong*)((ulong)&SONICADDR->rn^4)) 
#define WR(rn, v)	(sncdly(), *(ulong*)((ulong)&SONICADDR->rn^4) = (v)) 
1993/1219    
#define RD(rn)		(delay(0), *(ulong*)((ulong)&SONICADDR->rn^4)) 
#define WR(rn, v)	(delay(0), *(ulong*)((ulong)&SONICADDR->rn^4) = (v)) 
1993/0906    
#define ISquad(s)	if((ulong)s & 0x7) panic("sonic: Quad alignment"); 
1993/0903    
 
1993/0906    
typedef struct Pbuf Pbuf; 
1993/1218/sys/src/9/carrera/devether.c:251,2661993/1219/sys/src/9/carrera/devether.c:251,256
1993/0906    
void sonicswap(void*, int); 
 
1993/0903    
static void 
1993/1218    
sncdly(void) 
{ 
	int i, j, *pj; 
                 
	pj = &j; 
	for(i = 0; i < 200; i++) 
		*pj++; 
} 
                 
static void 
1993/0906    
wus(ushort *a, ushort v) 
{ 
	a[0] = v; 
1993/1218/sys/src/9/carrera/devether.c:458,4691993/1219/sys/src/9/carrera/devether.c:448,460
1993/0904    
		if(status == 0) 
			break; 
 
1993/1219    
		/* Clear the interrupt cause */ 
1993/0904    
		WR(isr, status); 
	 
		/* 
		 * Transmission complete, for good or bad. 
		 */ 
		if(status & (Txdn|Txer)){ 
1993/1219    
		if(status & (Txdn|Txer)) { 
1993/0906    
			txpkt = &c->tda[c->ti]; 
1993/0904    
			while(txpkt->status != Host){ 
				if(txpkt->status == Interface){ 
1993/1218/sys/src/9/carrera/devether.c:621,6271993/1219/sys/src/9/carrera/devether.c:612,617
1993/0904    
	 * Set the physical ethernet address and 
	 * prime the interrupt handler. 
	 */ 
1993/0905    
                 
1993/0906    
	if(ether[0] == 0) { 
		ctlr = malloc(sizeof(Ether)); 
		ether[0] = ctlr; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)