serial_outp(up, UART_IER, 0); 
if (up->capabilities & UART_CAP_UUE) serial_outp(up, UART_IER, UART_IER_UUE); else serial_outp(up, UART_IER, 0); 
static void autoconfig(struct uart_8250_port *up, unsigned int probeflags){	unsigned char status1, scratch, scratch2, scratch3;	unsigned char save_lcr, save_mcr;	unsigned long flags;	if (!up->port.iobase && !up->port.mapbase && !up->port.membase)		return;	DEBUG_AUTOCONF("ttyS%d: autoconf (0x%04x, 0x%p): ",			up->port.line, up->port.iobase, up->port.membase);	/*	 * We really do need global IRQs disabled here - we're going to	 * be frobbing the chips IRQ enable register to see if it exists.	 */	spin_lock_irqsave(&up->port.lock, flags);//	save_flags(flags); cli();	up->capabilities = 0;	up->bugs = 0;	if (!(up->port.flags & UPF_BUGGY_UART)) {		/*		 * Do a simple existence test first; if we fail this,		 * there's no point trying anything else.		 * 		 * 0x80 is used as a nonsense port to prevent against		 * false positives due to ISA bus float.  The		 * assumption is that 0x80 is a non-existent port;		 * which should be safe since include/asm/io.h also		 * makes this assumption.		 *		 * Note: this is safe as long as MCR bit 4 is clear		 * and the device is in "PC" mode.		 */		scratch = serial_inp(up, UART_IER);		serial_outp(up, UART_IER, 0);#ifdef __i386__		outb(0xff, 0x080);#endif		scratch2 = serial_inp(up, UART_IER);		serial_outp(up, UART_IER, 0x0F);#ifdef __i386__		outb(0, 0x080);#endif		scratch3 = serial_inp(up, UART_IER);		serial_outp(up, UART_IER, scratch);		if (scratch2 != 0 || scratch3 != 0x0F) {			/*			 * We failed; there's nothing here			 */			DEBUG_AUTOCONF("IER test failed (%02x, %02x) ",				       scratch2, scratch3);			goto out;		}	}	save_mcr = serial_in(up, UART_MCR);	save_lcr = serial_in(up, UART_LCR);	/* 	 * Check to see if a UART is really there.  Certain broken	 * internal modems based on the Rockwell chipset fail this	 * test, because they apparently don't implement the loopback	 * test mode.  So this test is skipped on the COM 1 through	 * COM 4 ports.  This *should* be safe, since no board	 * manufacturer would be stupid enough to design a board	 * that conflicts with COM 1-4 --- we hope!	 */	if (!(up->port.flags & UPF_SKIP_TEST)) {		serial_outp(up, UART_MCR, UART_MCR_LOOP | 0x0A);		status1 = serial_inp(up, UART_MSR) & 0xF0;		serial_outp(up, UART_MCR, save_mcr);		if (status1 != 0x90) {			DEBUG_AUTOCONF("LOOP test failed (%02x) ",				       status1);			goto out;		}	}	/*	 * We're pretty sure there's a port here.  Lets find out what	 * type of port it is.  The IIR top two bits allows us to find	 * out if it's 8250 or 16450, 16550, 16550A or later.  This	 * determines what we test for next.	 *	 * We also initialise the EFR (if any) to zero for later.  The	 * EFR occupies the same register location as the FCR and IIR.	 */	serial_outp(up, UART_LCR, 0xBF);	serial_outp(up, UART_EFR, 0);	serial_outp(up, UART_LCR, 0);	serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);	scratch = serial_in(up, UART_IIR) >> 6;	DEBUG_AUTOCONF("iir=%d ", scratch);	switch (scratch) {	case 0:		autoconfig_8250(up);		break;	case 1:		up->port.type = PORT_UNKNOWN;		break;	case 2:		up->port.type = PORT_16550;		break;	case 3:		autoconfig_16550a(up);		break;	}#ifdef CONFIG_SERIAL_8250_RSA	/*	 * Only probe for RSA ports if we got the region.	 */	if (up->port.type == PORT_16550A && probeflags & PROBE_RSA) {		int i;		for (i = 0 ; i < probe_rsa_count; ++i) {			if (probe_rsa[i] == up->port.iobase &&			    __enable_rsa(up)) {				up->port.type = PORT_RSA;				break;			}		}	}#endif#ifdef CONFIG_SERIAL_8250_AU1X00	/* if access method is AU, it is a 16550 with a quirk */	if (up->port.type == PORT_16550A && up->port.iotype == UPIO_AU)		up->bugs |= UART_BUG_NOMSR;#endif	serial_outp(up, UART_LCR, save_lcr);	if (up->capabilities != uart_config[up->port.type].flags) {		printk(KERN_WARNING		       "ttyS%d: detected caps %08x should be %08x\n",			up->port.line, up->capabilities,			uart_config[up->port.type].flags);	}	up->port.fifosize = uart_config[up->port.type].fifo_size;	up->capabilities = uart_config[up->port.type].flags;	up->tx_loadsz = uart_config[up->port.type].tx_loadsz;	if (up->port.type == PORT_UNKNOWN)		goto out;	/*	 * Reset the UART.	 */#ifdef CONFIG_SERIAL_8250_RSA	if (up->port.type == PORT_RSA)		serial_outp(up, UART_RSA_FRR, 0);#endif	serial_outp(up, UART_MCR, save_mcr);	serial8250_clear_fifos(up);	(void)serial_in(up, UART_RX);	serial_outp(up, UART_IER, 0); out:		spin_unlock_irqrestore(&up->port.lock, flags);//	restore_flags(flags);	DEBUG_AUTOCONF("type=%s\n", uart_config[up->port.type].name);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5c8c755ce508a9d41d8a8d80fff387cb4e2929fc/8250.c/clean/drivers/serial/8250.c