serial: sunhv: Initialize lock for non-registered console
Subsystems (2)
PATCH 1/1 serial: sunhv: Initialize lock for non-registered console
The commit a3cb39d258ef
("serial: core: Allow detach and attach serial device for console") changed a bit logic behind lock initialization since for most of the console driver it's supposed to have lock already initialized even if console is not enabled. However, it's not the case for Sparc HV console.
Initialize lock explicitly in the ->probe().
Note, there is still an open question should or shouldn't not this driver register console properly.
--- drivers/tty/serial/sunhv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/tty/serial/sunhv.c +3 -0
@@ -567,6 +567,9 @@ static int hv_probe(struct platform_device *op)sunserial_console_match (&sunhv_console, op->dev.of_node, &sunhv_reg, port->line, false); +/* We need to initialize lock even for non-registered console */ +spin_lock_init (&port->lock); + err =uart_add_one_port (&sunhv_reg, port);if (err) goto out_unregister_driver;
Signature · 1 line
2.25.1
Greg Kroah-Hartman
maintainerQuoted 11 lines · Andy Shevchenko
The commit
a3cb39d258ef
("serial: core: Allow detach and attach serial device for console") changed a bit logic behind lock initialization since for most of the console driver it's supposed to have lock already initialized even if console is not enabled. However, it's not the case for Sparc HV console.Initialize lock explicitly in the ->probe().
Note, there is still an open question should or shouldn't not this driver register console properly.
Quoted 7 lines
Fixes a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")Reported-by Anatoly Pugachev <[email protected]>Cc David Miller <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/sunhv.c | 3 +++ 1 file changed, 3 insertions(+)
Thanks, will pick this up after -rc1 is out.
greg k-h
Quoted 12 lines · Andy Shevchenko
The commit
a3cb39d258ef
("serial: core: Allow detach and attach serial device for console") changed a bit logic behind lock initialization since for most of the console driver it's supposed to have lock already initialized even if console is not enabled. However, it's not the case for Sparc HV console.Initialize lock explicitly in the ->probe().
Note, there is still an open question should or shouldn't not this driver register console properly.
Quoted 7 lines
Fixes a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")Reported-by Anatoly Pugachev <[email protected]>Cc David Miller <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/sunhv.c | 3 +++ 1 file changed, 3 insertions(+)
fixes issue for me, sorry for the late testing
Quoted 23 lines · Anatoly Pugachev
Quoted 12 lines · Andy Shevchenko
The commit
a3cb39d258ef
("serial: core: Allow detach and attach serial device for console") changed a bit logic behind lock initialization since for most of the console driver it's supposed to have lock already initialized even if console is not enabled. However, it's not the case for Sparc HV console.Initialize lock explicitly in the ->probe().
Note, there is still an open question should or shouldn't not this driver register console properly.
Quoted 7 lines
Fixes a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")Reported-by Anatoly Pugachev <[email protected]>Cc David Miller <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/sunhv.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 1 line
fixes issue for me, sorry for the late testing
Thank you! Can you formally provide a Tested-by tag?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Anatoly Pugachev
Tested-byQuoted 4 lines · Andy Shevchenko
Quoted 2 lines
fixes issue for me, sorry for the late testing
Thank you! Can you formally provide a Tested-by tag?
Andy,
up to you actually to add needed tags. Thanks.
But anyway,