Hello,
We are working with am3352 and using kernel 4.19.94 from TI SDK.
When we try to reconfigure uart settings with tcsetattr(), if data is still coming in and IXON flag is set, TX stops working.
Looking into omap-serial.c driver we see that data is written to the tx queue but in the oscilloscope we can see there is nothing in the TX line.
This driver seems to be based on 8250. Looking also in 8250_omap.c function omap_8250_set_termios() we see this comment, that could be the same problem
/*
* OMAP rx s/w flow control is borked; the transmitter remains
* stuck off even if rx flow control is subsequently disabled
*/
/*
* IXOFF Flag:
* Enable XON/XOFF flow control on output.
* Transmit XON1, XOFF1
*/
if (termios->c_iflag & IXOFF) {
up->port.status |= UPSTAT_AUTOXOFF;
priv->efr |= OMAP_UART_SW_TX;
}
We see that serial_omap_set_termios() in omap-serial.c is a bit different, and IXON is implepented:
/*
* IXON Flag:
* Enable XON/XOFF flow control on input.
* Receiver compares XON1, XOFF1.
*/
if (termios->c_iflag & IXON) {
up->efr |= OMAP_UART_SW_RX;
}
/*
* IXOFF Flag:
* Enable XON/XOFF flow control on output.
* Transmit XON1, XOFF1
*/
if (termios->c_iflag & IXOFF) {
up->port.status |= UPSTAT_AUTOXOFF;
up->efr |= OMAP_UART_SW_TX;
}
but according to termios manual page
IXON Enable XON/XOFF flow control on output.
IXOFF Enable XON/XOFF flow control on input.
And this is just the opposite way as considered in the driver.
If we change driver source code and make IXON for output and IXOFF for input error is fixed.
Could this be an error in the driver?
Best regards
Angel