On Tue, Feb 20, 2024 at 07:12:43AM +0100, Rickard Andersson wrote: > From: Rickard x Andersson <rickaran@xxxxxxxx> > > When about to transmit the function imx_uart_start_tx is called and in > some RS485 configurations this function will call imx_uart_stop_rx. The > problem is that imx_uart_stop_rx will enable loopback and when loopback > is enabled transmitted data will just be looped to RX. > > This patch fixes the above problem by explicitly disabling loopback in > the case described above. > > Fixes: 79d0224f6bf2 ("tty: serial: imx: Handle RS485 DE signal active high") > Signed-off-by: Rickard x Andersson <rickaran@xxxxxxxx> > --- > drivers/tty/serial/imx.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index 4aa72d5aeafb..899e331bdfc8 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -683,8 +683,15 @@ static void imx_uart_start_tx(struct uart_port *port) > imx_uart_writel(sport, ucr2, UCR2); > > if (!(port->rs485.flags & SER_RS485_RX_DURING_TX) && > - !port->rs485_rx_during_tx_gpio) > + !port->rs485_rx_during_tx_gpio) { > imx_uart_stop_rx(port); > + /* > + * The function imx_uart_stop_rx right above > + * will enable loopback, but since we are just > + * about to transmit then disable loopback. > + */ > + imx_uart_disable_loopback_rs485(sport); > + } > > sport->tx_state = WAIT_AFTER_RTS; > > -- > 2.30.2 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot