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

2001/0719/pc/uarti8250.c (diff list | history)

2001/0710/sys/src/9/pc/uarti8250.c:445,4512001/0719/sys/src/9/pc/uarti8250.c:445,451 (short | long | prev | next)
2001/0527    
{ 
	Ctlr *ctlr; 
	Uart *uart; 
	int iir, old, r; 
2001/0719    
	int iir, lsr, old, r; 
2001/0527    
 
	uart = arg; 
 
2001/0710/sys/src/9/pc/uarti8250.c:480,4962001/0719/sys/src/9/pc/uarti8250.c:480,504
2001/0527    
			break; 
		case Irda:		/* Received Data Available */ 
		case Ictoi:		/* Character Time-out Indication */ 
			uartrecv(uart, csr8r(ctlr, Rbr)); 
2001/0719    
			/* 
			 * Consume any received data. 
			 * If the received byte came in with a break, 
			 * parity or framing error, throw it away; 
			 * overrun is an indication that something has 
			 * already been tossed. 
			 */ 
			while((lsr = csr8r(ctlr, Lsr)) & Dr){ 
				if(lsr & Oe) 
					uart->oerr++; 
				if(lsr & Pe) 
					uart->perr++; 
				if(lsr & Fe) 
					uart->ferr++; 
				r = csr8r(ctlr, Rbr); 
				if(!(lsr & (Bi|Fe|Pe))) 
					uartrecv(uart, r); 
			} 
2001/0527    
			break; 
		case Irls:		/* Receiver Line Status */ 
			r = csr8r(ctlr, Lsr); 
			if(r & Oe) 
				uart->oerr++; 
			if(r & Pe) 
				uart->perr++; 
			if(r & Fe) 
				uart->ferr++; 
			break; 
		default: 
			iprint("weird uart interrupt 0x%2.2uX\n", iir); 
			break; 
2001/0710/sys/src/9/pc/uarti8250.c:532,5382001/0719/sys/src/9/pc/uarti8250.c:540,546
2001/0527    
			intrenable(ctlr->irq, i8250interrupt, uart, ctlr->tbdf, uart->name); 
			ctlr->iena = 1; 
		} 
		ctlr->sticky[Ier] = Erls|Ethre|Erda; 
2001/0719    
		ctlr->sticky[Ier] = Ethre|Erda; 
2001/0527    
		ctlr->sticky[Mcr] |= Ie; 
	} 
	else{ 


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