if (port->ops->get_mctrl(port) & TIOCM_CAR) 
spin_lock_irq(&port->lock); mctrl = port->ops->get_mctrl(port); spin_unlock_irq(&port->lock); if (mctrl & TIOCM_CAR) 
uart_block_til_ready(struct file *filp, struct uart_state *state){	DECLARE_WAITQUEUE(wait, current);	struct uart_info *info = state->info;	struct uart_port *port = state->port;	info->blocked_open++;	state->count--;	add_wait_queue(&info->open_wait, &wait);	while (1) {		set_current_state(TASK_INTERRUPTIBLE);		/*		 * If we have been hung up, tell userspace/restart open.		 */		if (tty_hung_up_p(filp) || info->tty == NULL)			break;		/*		 * If the port has been closed, tell userspace/restart open.		 */		if (!(info->flags & UIF_INITIALIZED))			break;		/*		 * If non-blocking mode is set, or CLOCAL mode is set,		 * we don't want to wait for the modem status lines to		 * indicate that the port is ready.		 *		 * Also, if the port is not enabled/configured, we want		 * to allow the open to succeed here.  Note that we will		 * have set TTY_IO_ERROR for a non-existant port.		 */		if ((filp->f_flags & O_NONBLOCK) ||	            (info->tty->termios->c_cflag & CLOCAL) ||		    (info->tty->flags & (1 << TTY_IO_ERROR))) {			break;		}		/*		 * Set DTR to allow modem to know we're waiting.  Do		 * not set RTS here - we want to make sure we catch		 * the data from the modem.		 */		if (info->tty->termios->c_cflag & CBAUD)			uart_set_mctrl(port, TIOCM_DTR);		/*		 * and wait for the carrier to indicate that the		 * modem is ready for us.		 */		if (port->ops->get_mctrl(port) & TIOCM_CAR)			break;		up(&state->sem);		schedule();		down(&state->sem);		if (signal_pending(current))			break;	}	set_current_state(TASK_RUNNING);	remove_wait_queue(&info->open_wait, &wait);	state->count++;	info->blocked_open--;	if (signal_pending(current))		return -ERESTARTSYS;	if (!info->tty || tty_hung_up_p(filp))		return -EAGAIN;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c5f4644e6c8ba21666128603e4e92544d3cd740d/serial_core.c/buggy/drivers/serial/serial_core.c