On Thu, Feb 02, 2017 at 07:40:53AM -0800, Tim Harvey wrote: > Something I noticed this time around while testing however is that in > some cases I'm not getting the dma_tx_callback telling us the tx dma > completed causing the stop_tx to return and the TXEN to not be > de-asserted. I hadn't noticed this before. Have you encountered it in > your use/testing? Hi Tim, a few weeks ago, Fabio and I discussed a DMA-related problem I have with RS485 on an i.MX6Q board. Are you observing this behavior you described on an i.MX6Q? As a quick workaround, I changed the imx driver to not enable DMA. (I commented out the call to imx_uart_dma_init in imx_startup) For the full discussion, see: https://lkml.org/lkml/2017/1/4/579 TL/DR: Sending a character leads to the whole circular buffer being sent and TXEN is asserted during that transmission, which takes about 4 seconds for 9600 baud. Here is how it looks on my logic analyzer: https://pqgruber.com/rs485_results.png It looks like it can only be reproduced on SMP systems, Fabio had only a i.MX6S available and could not reproduce it. What's interesting: If the transmit-complete interrupt is disabled (UCR4_TCEN), the data on TXD is fine. Somehow, the actions occuring after the transmit-complete interrupt, in the transmit_buffer function, lead to the the circular buffer struct's xmit->tail to jump over xmit->head. So instead of 2 bytes I wanted to send, additional 4094 bytes are sent out, during which TXEN stays asserted. Could this be the same issue you are observing now? Thanks, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html