Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681521 > unrolled thread
| Started by | Romain Perier <romain.perier@collabora.com> |
|---|---|
| First post | 2017-07-05 15:10 +0200 |
| Last post | 2017-07-05 16:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/6] serial: imx: remove CTSC and CTS handling Romain Perier <romain.perier@collabora.com> - 2017-07-05 15:10 +0200
Re: [PATCH v2 3/6] serial: imx: remove CTSC and CTS handling Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2017-07-05 15:40 +0200
Re: [PATCH v2 3/6] serial: imx: remove CTSC and CTS handling Clemens Gruber <clemens.gruber@pqgruber.com> - 2017-07-05 16:50 +0200
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Date | 2017-07-05 15:10 +0200 |
| Subject | [PATCH v2 3/6] serial: imx: remove CTSC and CTS handling |
| Message-ID | <tZSe5-6Cw-5@gated-at.bofh.it> |
From: Nandor Han <nandor.han@ge.com> CTSC and CTS are not related to DMA and might add disruption in some cases. Signed-off-by: Romain Perier <romain.perier@collabora.com> --- drivers/tty/serial/imx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 5291b86..dd3ebb4 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1249,11 +1249,6 @@ static void imx_disable_dma(struct imx_port *sport) imx_stop_rx_dma(sport); imx_stop_tx_dma(sport); - /* clear UCR2 */ - temp = readl(sport->port.membase + UCR2); - temp &= ~(UCR2_CTSC | UCR2_CTS | UCR2_ATEN); - writel(temp, sport->port.membase + UCR2); - imx_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); sport->dma_is_enabled = 0; -- 1.8.3.1
[toc] | [next] | [standalone]
| From | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
|---|---|
| Date | 2017-07-05 15:40 +0200 |
| Message-ID | <tZSH8-6Md-9@gated-at.bofh.it> |
| In reply to | #1681521 |
Cc += Clemens Gruber + Fabio Estevam On Wed, Jul 05, 2017 at 03:07:03PM +0200, Romain Perier wrote: > From: Nandor Han <nandor.han@ge.com> > > CTSC and CTS are not related to DMA and might add > disruption in some cases. > > Signed-off-by: Romain Perier <romain.perier@collabora.com> If it was Nandor Han who created this patch, it would be great to get his sob. If it was you, drop the From: line above. > --- > drivers/tty/serial/imx.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index 5291b86..dd3ebb4 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -1249,11 +1249,6 @@ static void imx_disable_dma(struct imx_port *sport) > imx_stop_rx_dma(sport); > imx_stop_tx_dma(sport); > > - /* clear UCR2 */ > - temp = readl(sport->port.membase + UCR2); > - temp &= ~(UCR2_CTSC | UCR2_CTS | UCR2_ATEN); > - writel(temp, sport->port.membase + UCR2); > - Before this patch imx_disable_dma resulted in the #CTS pin being high (inactive). Does this qualify as a fix? If so, you should sort this patch to the beginning of the series. Did you do test this patch and its effects separately? @Clemens: maybe this patch makes a relevant difference when the port is operated in rs485 mode. Do you care to test? > imx_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); > > sport->dma_is_enabled = 0; > -- > 1.8.3.1 Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
[toc] | [prev] | [next] | [standalone]
| From | Clemens Gruber <clemens.gruber@pqgruber.com> |
|---|---|
| Date | 2017-07-05 16:50 +0200 |
| Message-ID | <tZTMR-7yB-3@gated-at.bofh.it> |
| In reply to | #1681539 |
Hi, On Wed, Jul 05, 2017 at 03:38:45PM +0200, Uwe Kleine-König wrote: > Cc += Clemens Gruber + Fabio Estevam > > On Wed, Jul 05, 2017 at 03:07:03PM +0200, Romain Perier wrote: > > From: Nandor Han <nandor.han@ge.com> > > > > CTSC and CTS are not related to DMA and might add > > disruption in some cases. > > > > Signed-off-by: Romain Perier <romain.perier@collabora.com> > > If it was Nandor Han who created this patch, it would be great to get > his sob. If it was you, drop the From: line above. > > > --- > > drivers/tty/serial/imx.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > > index 5291b86..dd3ebb4 100644 > > --- a/drivers/tty/serial/imx.c > > +++ b/drivers/tty/serial/imx.c > > @@ -1249,11 +1249,6 @@ static void imx_disable_dma(struct imx_port *sport) > > imx_stop_rx_dma(sport); > > imx_stop_tx_dma(sport); > > > > - /* clear UCR2 */ > > - temp = readl(sport->port.membase + UCR2); > > - temp &= ~(UCR2_CTSC | UCR2_CTS | UCR2_ATEN); > > - writel(temp, sport->port.membase + UCR2); > > - > > Before this patch imx_disable_dma resulted in the #CTS pin being high > (inactive). > > Does this qualify as a fix? If so, you should sort this patch to the > beginning of the series. Did you do test this patch and its effects > separately? > > @Clemens: maybe this patch makes a relevant difference when the port is > operated in rs485 mode. Do you care to test? I just finished testing it. The results are about the same as with v1 of this patch series: Applying v2 of patch 1/6, 2/6 and 3/6 (or even 3/6 alone) does not fix the RS-485 DMA bug. It behaves exactly the same as without these patches, meaning the whole xmit circ_buf (UART_XMIT_SIZE bytes) is sent out, as seen in the logic analyzer screenshots from my first bug report: https://pqgruber.com/rs485_results.png Applying the whole series does make a (small) difference though: The first few transmissions after a fresh boot work correctly! However, after a few transmissions, characters are sent out twice and longer transmissions are garbled, although not in the same way as before. The whole circ_buf is no longer sent out. With all patches from this series applied, I see the following on the logic analyzer, when calling "echo Test > /dev/ttymxc4": https://pqgruber.com/rs485txtest.png (This pattern is not always the same, sometimes it is TeTesstt\n\n, sometimes TeTesst\nt\n or TeTsestt\n\n and so on) This behavior is reproducible on i.MX6Q and i.MX6D, not on i.MX6S/etc., I therefore assume that it is a SMP-/locking-related problem. I will try to debug this further, and verify if - with this series applied - xmit->tail is still jumping over xmit->head. And when exactly this is happening. Help is much appreciated! Best regards, Clemens
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web