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

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

1993/1217/sys/src/9/carrera/devether.c:15,221993/1218/sys/src/9/carrera/devether.c:15,22 (short | long | prev | next)
1993/0903    
 
1993/0904    
#define SONICADDR	((Sonic*)Sonicbase) 
1993/0903    
 
1993/1217    
#define RD(rn)		(delay(0), *(ulong*)((ulong)&SONICADDR->rn^4)) 
#define WR(rn, v)	(delay(0), *(ulong*)((ulong)&SONICADDR->rn^4) = (v)) 
1993/1218    
#define RD(rn)		(sncdly(), *(ulong*)((ulong)&SONICADDR->rn^4)) 
#define WR(rn, v)	(sncdly(), *(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/1217/sys/src/9/carrera/devether.c:74,801993/1218/sys/src/9/carrera/devether.c:74,80
1993/0903    
 
enum 
{ 
1993/1217    
	Nrb		= 8,		/* receive buffers */ 
1993/1218    
	Nrb		= 16,		/* receive buffers */ 
1993/1217    
	Ntb		= 8,		/* transmit buffers */ 
1993/0904    
}; 
1993/0903    
 
1993/1217/sys/src/9/carrera/devether.c:251,2561993/1218/sys/src/9/carrera/devether.c:251,266
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/1217/sys/src/9/carrera/devether.c:530,5391993/1218/sys/src/9/carrera/devether.c:540,547
1993/0904    
			status &= ~Hbl; 
1993/0903    
		} 
1993/0904    
		if(status & Br){ 
1993/1217    
			WR(cr, 0); 
			iprint("sonic: bus retry occurred\n"); 
1993/1218    
			print("sonic: bus retry occurred\n"); 
1993/0904    
			status &= ~Br; 
1993/1217    
			for(;;); 
1993/0904    
		} 
	 
		if(status & AllIntr) 


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