All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>,
	Fabio Estevam <fabio.estevam@nxp.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Kai Ruhnau <kai.ruhnau@target-sg.com>,
	"# 4 . 9+" <stable@vger.kernel.org>,
	Martyn Welch <martyn.welch@collabora.co.uk>,
	Shawn Guo <shawnguo@kernel.org>,
	Clemens Gruber <clemens.gruber@pqgruber.com>,
	Tim Harvey <tharvey@gateworks.com>
Subject: Re: [PATCH] serial: imx: Only enable UART DMA on i.MX6Q and i.MX53
Date: Mon, 6 Feb 2017 20:05:13 +0100	[thread overview]
Message-ID: <e7f91dac-03a0-d6d1-5b12-cafcc45314f1@denx.de> (raw)
In-Reply-To: <CAOMZO5D8_vE+t=V6wHMKt590jZqJJRzeJ+_MLgqbLp=6gwsmyQ@mail.gmail.com>

On 02/05/2017 05:36 PM, Fabio Estevam wrote:
> On Sun, Feb 5, 2017 at 12:56 PM, Fabio Estevam <fabio.estevam@nxp.com> wrote:
>> [Sorry, for the top-posting]
>>
>>
>> imx6sx uart should be of a IMX6Q_UART instead.
>>
>>
>> Does this patch fix the issue?
> 
> It seems this dts change will not fix the problem.

Yeah, it won't , see the commit that this patch fixes. It introduces a
bug and if you want DMA on MX6SX, this should be another separate patch.

>> From: Kai Ruhnau <kai.ruhnau@target-sg.com>
>>
>> In 1c06bde6 with the introduction of DMA support for the i.MX53 platform,
>> DMA was enabled for all platforms instead. On an i.MX6SX (which is a
>> IMX21_UART), this breaks gpsd talking to an UART module with
>>
>>  imx-uart 21f4000.serial: DMA transaction error.
>>
>> This patch makes sure, UART DMA is only activated for i.MX53 and i.MX6Q.
>>
>> Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>> Fixes: 1c06bde643d0 ("Allowing UART DMA to be configured on i.MX53")
>> Cc: <stable@vger.kernel.org> # 4.9+
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Martyn Welch <martyn.welch@collabora.co.uk>
>> Cc: Shawn Guo <shawnguo@kernel.org>
>> ---
>>  drivers/tty/serial/imx.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
>> index a70356d..8e2b5f2 100644
>> --- a/drivers/tty/serial/imx.c
>> +++ b/drivers/tty/serial/imx.c
>> @@ -1269,7 +1269,8 @@ static int imx_startup(struct uart_port *port)
>>          writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
>>
>>          /* Can we enable the DMA support? */
>> -       if (!uart_console(port) && !sport->dma_is_inited)
>> +       if ((is_imx6q_uart(sport)  || is_imx53_uart(sport)) &&
>> +           !uart_console(port) && !sport->dma_is_inited)
>>                  imx_uart_dma_init(sport);
> 
> Looks like imx serial DMA is broken in 4.9.

Well yes, DMA is broken in 4.9 , that's why it's CC stable 4.9+ :)

> There is also this report from Clemens: https://lkml.org/lkml/2017/1/4/579
> 
> Could anyone run a git bisect?

Ummmmmmmm ... see above ? :)
Fixes: 1c06bde643d0 ("Allowing UART DMA to be configured on i.MX53")

-- 
Best regards,
Marek Vasut

WARNING: multiple messages have this Message-ID (diff)
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: imx: Only enable UART DMA on i.MX6Q and i.MX53
Date: Mon, 6 Feb 2017 20:05:13 +0100	[thread overview]
Message-ID: <e7f91dac-03a0-d6d1-5b12-cafcc45314f1@denx.de> (raw)
In-Reply-To: <CAOMZO5D8_vE+t=V6wHMKt590jZqJJRzeJ+_MLgqbLp=6gwsmyQ@mail.gmail.com>

On 02/05/2017 05:36 PM, Fabio Estevam wrote:
> On Sun, Feb 5, 2017 at 12:56 PM, Fabio Estevam <fabio.estevam@nxp.com> wrote:
>> [Sorry, for the top-posting]
>>
>>
>> imx6sx uart should be of a IMX6Q_UART instead.
>>
>>
>> Does this patch fix the issue?
> 
> It seems this dts change will not fix the problem.

Yeah, it won't , see the commit that this patch fixes. It introduces a
bug and if you want DMA on MX6SX, this should be another separate patch.

>> From: Kai Ruhnau <kai.ruhnau@target-sg.com>
>>
>> In 1c06bde6 with the introduction of DMA support for the i.MX53 platform,
>> DMA was enabled for all platforms instead. On an i.MX6SX (which is a
>> IMX21_UART), this breaks gpsd talking to an UART module with
>>
>>  imx-uart 21f4000.serial: DMA transaction error.
>>
>> This patch makes sure, UART DMA is only activated for i.MX53 and i.MX6Q.
>>
>> Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>> Fixes: 1c06bde643d0 ("Allowing UART DMA to be configured on i.MX53")
>> Cc: <stable@vger.kernel.org> # 4.9+
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Martyn Welch <martyn.welch@collabora.co.uk>
>> Cc: Shawn Guo <shawnguo@kernel.org>
>> ---
>>  drivers/tty/serial/imx.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
>> index a70356d..8e2b5f2 100644
>> --- a/drivers/tty/serial/imx.c
>> +++ b/drivers/tty/serial/imx.c
>> @@ -1269,7 +1269,8 @@ static int imx_startup(struct uart_port *port)
>>          writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
>>
>>          /* Can we enable the DMA support? */
>> -       if (!uart_console(port) && !sport->dma_is_inited)
>> +       if ((is_imx6q_uart(sport)  || is_imx53_uart(sport)) &&
>> +           !uart_console(port) && !sport->dma_is_inited)
>>                  imx_uart_dma_init(sport);
> 
> Looks like imx serial DMA is broken in 4.9.

Well yes, DMA is broken in 4.9 , that's why it's CC stable 4.9+ :)

> There is also this report from Clemens: https://lkml.org/lkml/2017/1/4/579
> 
> Could anyone run a git bisect?

Ummmmmmmm ... see above ? :)
Fixes: 1c06bde643d0 ("Allowing UART DMA to be configured on i.MX53")

-- 
Best regards,
Marek Vasut

  parent reply	other threads:[~2017-02-06 19:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-04 21:39 [PATCH] serial: imx: Only enable UART DMA on i.MX6Q and i.MX53 Marek Vasut
2017-02-04 21:39 ` Marek Vasut
     [not found] ` <DB6PR0402MB2743C709F162BDE52429DF49E3410@DB6PR0402MB2743.eurprd04.prod.outlook.com>
2017-02-05 16:36   ` Fabio Estevam
2017-02-05 16:36     ` Fabio Estevam
2017-02-05 17:51     ` Clemens Gruber
2017-02-06 19:24       ` Marek Vasut
2017-02-06 19:05     ` Marek Vasut [this message]
2017-02-06 19:05       ` Marek Vasut
2017-02-06 19:38       ` Fabio Estevam
2017-02-06 19:38         ` Fabio Estevam
2017-02-06 19:43         ` Marek Vasut
2017-02-06 19:43           ` Marek Vasut
2017-02-06 23:39           ` Fabio Estevam
2017-02-06 23:39             ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7f91dac-03a0-d6d1-5b12-cafcc45314f1@denx.de \
    --to=marex@denx.de \
    --cc=clemens.gruber@pqgruber.com \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kai.ruhnau@target-sg.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=martyn.welch@collabora.co.uk \
    --cc=shawnguo@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.