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

1991/0108/port/devlance.c (diff list | history)

1991/0108/sys/src/9/port/devlance.c:176,1881991/0109/sys/src/9/port/devlance.c:176,181 (short | long | prev | next)
1990/0227    
#define INIT	0x1 
 
/* 
 *  LANCE CSR3 
 */ 
#define BSWP	0x4 
#define ACON	0x2 
#define BCON	0x1 
                 
/* 
 *  flag bits from a buffer descriptor in the rcv/xmt rings 
 */ 
#define OWN	0x8000	/* 1 means that the buffer can be used by the chip */ 
1991/0108/sys/src/9/port/devlance.c:342,3501991/0109/sys/src/9/port/devlance.c:335,341
1990/0227    
	 *  Wait till we get an output buffer 
	 */ 
	if(TSUCC(l.tc) == l.tl){ 
		print("lance obuf sleep"); 
		sleep(&l.tr, isobuf, (void *)0); 
		print("done"); 
	} 
1990/0911    
	p = &l.tp[l.tc]; 
1990/0227    
 
1991/0108/sys/src/9/port/devlance.c:422,4341991/0109/sys/src/9/port/devlance.c:413,418
1990/1231    
		lancesetup(&l); 
	} 
1990/1229    
 
1991/0108    
	*l.rap = 0; 
	print("csr0 %lux\n", *l.rdp); 
	*l.rap = 1; 
	print("csr1 %lux\n", *l.rdp); 
	*l.rap = 2; 
	print("csr2 %lux\n", *l.rdp); 
                 
1990/0227    
	/* 
1990/1228    
	 *  stop the lance 
1990/0227    
	 */ 
1991/0108/sys/src/9/port/devlance.c:521,5361991/0109/sys/src/9/port/devlance.c:505,518
1990/0227    
	 */ 
	wbflush(); 
	*l.rap = 3; 
	*l.rdp = BSWP; 
1991/0109    
	*l.rdp = l.busctl; 
1990/0227    
 
	/* 
	 *  initialize lance, turn on interrupts, turn on transmit and rcv. 
	 */ 
1990/1229    
	wbflush(); 
1990/1231    
	print("starting lance\n"); 
1990/0227    
	*l.rap = 0; 
	*l.rdp = INEA|INIT|STRT; /**/ 
1990/1231    
	print("lance started\n"); 
1990/0227    
} 
 
/* 
1991/0108/sys/src/9/port/devlance.c:746,7611991/0109/sys/src/9/port/devlance.c:728,733
1990/0227    
	 */ 
1991/0108    
	if(csr & (BABL|MISS|MERR)){ 
1990/0227    
		print("lance err %ux\n", csr); 
1991/0108    
		print("aser %lux asevar %lux\n", getw2(0x60000008), getw2(0x6000000C)); 
	*l.rap = 0; 
	*l.rdp = STOP; 
delay(100); 
	*l.rap = 0; 
	print("csr0 %lux\n", *l.rdp); 
	*l.rap = 1; 
	print("csr1 %lux\n", *l.rdp); 
	*l.rap = 2; 
	print("csr2 %lux\n", *l.rdp); 
	} 
1990/0227    
 
1990/1231    
	if(csr & IDON){ 


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