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

1992/0405/pc/devether.c (diff list | history)

1992/0404/sys/src/9/pc/devether.c:148,1571992/0405/sys/src/9/pc/devether.c:148,155 (short | long | prev | next)
1992/0403    
			t->prom = 1; 
			qlock(c); 
			c->prom++; 
1992/0404    
			if(c->prom == 1){ 
				outb(t->ctlr->iobase+Cr, 0x22);	/* Page0, RD2|STA */ 
1992/0405    
			if(c->prom == 1) 
1992/0403    
				outb(c->iobase+Rcr, 0x14);	/* PRO|AB */ 
1992/0404    
			} 
1992/0403    
			qunlock(c); 
		} 
		freeb(bp); 
1992/0404/sys/src/9/pc/devether.c:290,2991992/0405/sys/src/9/pc/devether.c:288,295
1992/0404    
	if(pp->prom){ 
		qlock(pp->ctlr); 
		pp->ctlr->prom--; 
		if(pp->ctlr->prom == 0){ 
			outb(pp->ctlr->iobase+Cr, 0x22);/* Page0, RD2|STA */ 
1992/0405    
		if(pp->ctlr->prom == 0) 
1992/0404    
			outb(pp->ctlr->iobase+Rcr, 0x04);/* AB */ 
		} 
		qunlock(pp->ctlr); 
1992/0403    
	} 
1992/0404    
	qlock(pp); 
1992/0404/sys/src/9/pc/devether.c:363,3691992/0405/sys/src/9/pc/devether.c:359,364
1992/0404    
	Ctlr *cp = &ctlr[0]; 
	uchar isr, curr; 
 
	outb(cp->iobase+Cr, 0x22);			/* Page0, RD2|STA */ 
	while(isr = inb(cp->iobase+Isr)){ 
		outb(cp->iobase+Isr, isr); 
		if(isr & Txe) 
1992/0404/sys/src/9/pc/devether.c:397,4031992/0405/sys/src/9/pc/devether.c:392,398
1992/0404    
		 * we have received packets. 
		 * this is the only place, other than the init code, 
		 * where we set the controller to Page1. 
		 * we must be careful to reset it back to Page0 in case 
1992/0405    
		 * we must be sure to reset it back to Page0 in case 
1992/0404    
		 * we interrupted some other part of this driver. 
		 */ 
		if(isr & (Ovw|Prx)){ 
1992/0404/sys/src/9/pc/devether.c:411,4181992/0405/sys/src/9/pc/devether.c:406,414
1992/0403    
 
/* 
 * the following initialisation procedure 
 * is mandatory 
1992/0405    
 * is mandatory. 
1992/0404    
 * we leave the chip idling on internal loopback 
1992/0405    
 * and pointing to Page0. 
1992/0403    
 */ 
static void 
1992/0404    
init(Ctlr *cp) 


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