All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Jan Kiszka <jan.kiszka@web.de>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com,
	stable@vger.kernel.org
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] tty: xilinx_uartps: Fix missing id assignment to the console
Date: Mon, 1 Jun 2020 12:23:20 +0200	[thread overview]
Message-ID: <fb68cf8c-8b89-b7d1-ed7d-f21c327a0c75@xilinx.com> (raw)
In-Reply-To: <170a896f-42d3-345b-7b93-c964d33fe71c@web.de>

On 30. 05. 20 14:06, Jan Kiszka wrote:
> On 04.05.20 16:27, Michal Simek wrote:
>> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>>
>> When serial console has been assigned to ttyPS1 (which is serial1 alias)
>> console index is not updated property and pointing to index -1 (statically
>> initialized) which ends up in situation where nothing has been printed on
>> the port.
>>
>> The commit 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console
>> and driver structures"") didn't contain this line which was removed by
>> accident.
>>
>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>> Cc: stable <stable@vger.kernel.org>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> Changes in v2:
>> - Do better commit description
>> - Origin subject was "tty: xilinx_uartps: Add the id to the console"
>>
>> Greg: Would be good if you can take this patch to 5.7 and also to stable
>> trees.
>>
>> ---
>>  drivers/tty/serial/xilinx_uartps.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
>> index 672cfa075e28..b9d672af8b65 100644
>> --- a/drivers/tty/serial/xilinx_uartps.c
>> +++ b/drivers/tty/serial/xilinx_uartps.c
>> @@ -1465,6 +1465,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
>>  		cdns_uart_uart_driver.nr = CDNS_UART_NR_PORTS;
>>  #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
>>  		cdns_uart_uart_driver.cons = &cdns_uart_console;
>> +		cdns_uart_console.index = id;
>>  #endif
>>
>>  		rc = uart_register_driver(&cdns_uart_uart_driver);
>>
> 
> This breaks the ultra96-rev1 which uses uart1 as serial0 (and
> stdout-path = "serial0:115200n8"). Reverting this commit gives
> 
> [    0.024344] Serial: AMBA PL011 UART driver
> [    0.028010] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 19, base_baud = 6250000) is a xuartps
> [    0.028172] serial serial0: tty port ttyPS1 registered
> [    0.028579] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 20, base_baud = 6250000) is a xuartps
> [    0.557477] printk: console [ttyPS0] enabled
> 
> again. Affects stable as well (seen first in 5.4).

Will take a look at this. Just give me some time.

M


WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <michal.simek@xilinx.com>
To: Jan Kiszka <jan.kiszka@web.de>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com,
	stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH v2] tty: xilinx_uartps: Fix missing id assignment to the console
Date: Mon, 1 Jun 2020 12:23:20 +0200	[thread overview]
Message-ID: <fb68cf8c-8b89-b7d1-ed7d-f21c327a0c75@xilinx.com> (raw)
In-Reply-To: <170a896f-42d3-345b-7b93-c964d33fe71c@web.de>

On 30. 05. 20 14:06, Jan Kiszka wrote:
> On 04.05.20 16:27, Michal Simek wrote:
>> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>>
>> When serial console has been assigned to ttyPS1 (which is serial1 alias)
>> console index is not updated property and pointing to index -1 (statically
>> initialized) which ends up in situation where nothing has been printed on
>> the port.
>>
>> The commit 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console
>> and driver structures"") didn't contain this line which was removed by
>> accident.
>>
>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>> Cc: stable <stable@vger.kernel.org>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> Changes in v2:
>> - Do better commit description
>> - Origin subject was "tty: xilinx_uartps: Add the id to the console"
>>
>> Greg: Would be good if you can take this patch to 5.7 and also to stable
>> trees.
>>
>> ---
>>  drivers/tty/serial/xilinx_uartps.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
>> index 672cfa075e28..b9d672af8b65 100644
>> --- a/drivers/tty/serial/xilinx_uartps.c
>> +++ b/drivers/tty/serial/xilinx_uartps.c
>> @@ -1465,6 +1465,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
>>  		cdns_uart_uart_driver.nr = CDNS_UART_NR_PORTS;
>>  #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
>>  		cdns_uart_uart_driver.cons = &cdns_uart_console;
>> +		cdns_uart_console.index = id;
>>  #endif
>>
>>  		rc = uart_register_driver(&cdns_uart_uart_driver);
>>
> 
> This breaks the ultra96-rev1 which uses uart1 as serial0 (and
> stdout-path = "serial0:115200n8"). Reverting this commit gives
> 
> [    0.024344] Serial: AMBA PL011 UART driver
> [    0.028010] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 19, base_baud = 6250000) is a xuartps
> [    0.028172] serial serial0: tty port ttyPS1 registered
> [    0.028579] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 20, base_baud = 6250000) is a xuartps
> [    0.557477] printk: console [ttyPS0] enabled
> 
> again. Affects stable as well (seen first in 5.4).

Will take a look at this. Just give me some time.

M


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-01 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 14:27 [PATCH v2] tty: xilinx_uartps: Fix missing id assignment to the console Michal Simek
2020-05-04 14:27 ` Michal Simek
2020-05-06 23:42 ` Sasha Levin
2020-05-30 12:06 ` Jan Kiszka
2020-05-30 12:06   ` Jan Kiszka
2020-06-01 10:23   ` Michal Simek [this message]
2020-06-01 10:23     ` Michal Simek
2020-06-18  7:52     ` Michal Simek
2020-06-18  7:52       ` Michal Simek

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=fb68cf8c-8b89-b7d1-ed7d-f21c327a0c75@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jan.kiszka@web.de \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=stable@vger.kernel.org \
    /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.