2024-01-31 21:36:33

by Marek Szyprowski

[permalink] [raw]
Subject: [PATCH] tty: serial: amba-pl011: Fix removal of the QDF2xxx workarounds

Commit 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx
workarounds") removed some quirks specific to QDF2xxx SoC family.
Unfortunately it removed a bit too much code from the
pl011_console_match() function, what broke console operation on QEMU's
'virt' ARM/ARM64 machines. Restore the "pl011" related string check as it
was originally introduced in the commit 10879ae5f12e ("serial: pl011: add
console matching function").

Fixes: 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx workarounds")
Signed-off-by: Marek Szyprowski <[email protected]>
---
drivers/tty/serial/amba-pl011.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c4df9cbc264b..33d559fa10a6 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2451,6 +2451,9 @@ static int pl011_console_match(struct console *co, char *name, int idx,
resource_size_t addr;
int i;

+ if (strcmp(name, "pl011") != 0)
+ return -ENODEV;
+
if (uart_parse_earlycon(options, &iotype, &addr, &options))
return -ENODEV;

--
2.34.1



2024-02-01 11:30:19

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: amba-pl011: Fix removal of the QDF2xxx workarounds

On Wed Jan 31, 2024 at 10:35 PM CET, Marek Szyprowski wrote:
> Commit 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx
> workarounds") removed some quirks specific to QDF2xxx SoC family.
> Unfortunately it removed a bit too much code from the
> pl011_console_match() function, what broke console operation on QEMU's
> 'virt' ARM/ARM64 machines. Restore the "pl011" related string check as it
> was originally introduced in the commit 10879ae5f12e ("serial: pl011: add
> console matching function").
>
> Fixes: 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx workarounds")
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> drivers/tty/serial/amba-pl011.c | 3 +++
> 1 file changed, 3 insertions(+)

I was about to send out the same patch:

Reviewed-by: Thierry Reding <[email protected]>

2024-03-07 21:57:24

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: amba-pl011: Fix removal of the QDF2xxx workarounds

On Thu, Feb 01, 2024 at 12:29:55PM +0100, Thierry Reding wrote:
> On Wed Jan 31, 2024 at 10:35 PM CET, Marek Szyprowski wrote:
> > Commit 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx
> > workarounds") removed some quirks specific to QDF2xxx SoC family.
> > Unfortunately it removed a bit too much code from the
> > pl011_console_match() function, what broke console operation on QEMU's
> > 'virt' ARM/ARM64 machines. Restore the "pl011" related string check as it
> > was originally introduced in the commit 10879ae5f12e ("serial: pl011: add
> > console matching function").
> >
> > Fixes: 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx workarounds")
> > Signed-off-by: Marek Szyprowski <[email protected]>
> > ---
> > drivers/tty/serial/amba-pl011.c | 3 +++
> > 1 file changed, 3 insertions(+)
>
> I was about to send out the same patch:
>
> Reviewed-by: Thierry Reding <[email protected]>

Oops, I applied this, but will drop it, as it's already fixed up in my
tree with a different commit.

thanks,

greg k-h