Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbdGBURV (ORCPT ); Sun, 2 Jul 2017 16:17:21 -0400 Received: from mail.pqgruber.com ([178.189.19.235]:31161 "EHLO mail.pqgruber.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751876AbdGBURT (ORCPT ); Sun, 2 Jul 2017 16:17:19 -0400 Date: Sun, 2 Jul 2017 22:17:15 +0200 From: Clemens Gruber To: Fabio Estevam , Romain Perier Cc: linux-serial@vger.kernel.org, Nandor Han , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u.kleine-koenig@pengutronix.de, Fugang Duan , G.Schenk@eckelmann.de Subject: Re: [PATCH] serial: imx: disable DMA for RS-485 on i.MX6 SMP Message-ID: <20170702201715.GA26018@archie.localdomain> References: <20170620153701.12626-1-clemens.gruber@pqgruber.com> <20170621140556.GA766@archie.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1624 Lines: 44 Hi Fabio, Hi Romain, On Fri, Jun 30, 2017 at 09:15:31AM -0300, Fabio Estevam wrote: > Hi Clemens, > > On Wed, Jun 21, 2017 at 11:12 AM, Fabio Estevam wrote: > > >> I'd also prefer fixing the underlying problem. > > > > Yes, that would be much better. > > Just saw Romain's patch series that addresses several imx uart DMA issues: > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-June/516845.html > > If you have a chance, please give it a try to see if it helps on the > RS485 DMA case. Thanks, I just finished my first tests with Romain's patch series: It looks like these patches fixed some of the bugs, causing this behavior, but not all: The behavior changed, the rest of the circular buffer is no longer sent out as seen in the previous bug report (https://pqgruber.com/rs485_results.png) But now, with the patch series applied, if I transmit "Test", the logic analyzer records the following: https://pqgruber.com/rs485txtest.png Most of the time it looked like this (T e T e s s t t LF LF), but in a few cases I observed another pattern (T e T s e s t t LF LF) when transmitting "Test" by calling echo Test > /dev/ttymxc4. If I do a echo A > /dev/ttymxc4 as in my first bug report, now I always see the pattern A LF A LF on the TX line, but no longer A LF A LF 0 0 .. Interestingly, the bug does not appear the first time I try echo A after a reboot. Romain: What board did you use to test your patch series? The RS485 bug, I reported, only appears on i.MX6D and i.MX6Q, but not on single-core / non-SMP systems. Would be great if you could reproduce it! Regards, Clemens