[lkml]   [2007]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] serial: set RTS and DTR if flow is 'r' --- resend
Russell King wrote:
> Still wrong, and unfortunately you haven't understood what I was saying
> at all because this is worse. ;(
> Do not put the code in serial8250_set_termios. It is the wrong place.

I don't want to put that there. the problem is serial8250_set_mctrl
called by will clear DTR bit.

uart_set_options==>serial8250_set_termios ==> serial8250_set_mctrl will
clear DTR bit


static void serial8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned char mcr = 0;

if (mctrl & TIOCM_RTS)
mcr |= UART_MCR_RTS;
if (mctrl & TIOCM_DTR)
mcr |= UART_MCR_DTR;
if (mctrl & TIOCM_OUT1)
mcr |= UART_MCR_OUT1;
if (mctrl & TIOCM_OUT2)
mcr |= UART_MCR_OUT2;
if (mctrl & TIOCM_LOOP)

mcr = (mcr & up->mcr_mask) | up->mcr_force | up->mcr;

serial_out(up, UART_MCR, mcr);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-05-14 21:51    [W:0.153 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site