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

1994/0201/pc/ether8390.c (diff list | history)

1994/0130/sys/src/9/pc/ether8390.c:285,2911994/0201/sys/src/9/pc/ether8390.c:285,293 (short | long | prev | next)
1993/1118    
	ulong port = dp8390->dp8390; 
	ulong crda; 
1992/1222    
	uchar cr; 
1994/0201    
	int s, tries; 
1992/1222    
 
1994/0201    
	s = splhi(); 
1992/1222    
	/* 
1993/0212    
	 * Write some data to offset 'to' in the card's memory 
1992/1222    
	 * using the DP8390 remote DMA facility, reading it at 
1994/0130/sys/src/9/pc/ether8390.c:336,3411994/0201/sys/src/9/pc/ether8390.c:338,344
1993/1118    
		outss(dp8390->data, from, len/2); 
1992/1222    
	else 
1993/1118    
		outsb(dp8390->data, from, len); 
1994/0201    
	splx(s); 
1992/1222    
 
	/* 
	 * Wait for the remote DMA to finish. We'll need 
1994/0130/sys/src/9/pc/ether8390.c:342,3491994/0201/sys/src/9/pc/ether8390.c:345,356
1992/1222    
	 * a timeout here if this ever gets called before 
	 * we know there really is a chip there. 
	 */ 
1994/0201    
	tries = 0; 
1994/0130    
	while((slowinb(port+Isr) & Rdc) == 0) 
1992/1222    
			; 
1994/0201    
		if(tries++ >= 10000000){ 
			print("dp8390write whoops\n"); 
			break; 
		} 
1992/1222    
 
1994/0130    
	slowoutb(port+Isr, Rdc); 
	slowoutb(port+Cr, cr); 


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