On 5/15/2023 9:28 AM, Greg Kroah-Hartman wrote:
From: Florian Fainelli f.fainelli@gmail.com
[ Upstream commit 0ba9e3a13c6adfa99e32b2576d20820ab10ad48a ]
An 8250 UART configured as a wake-up source would not have reported itself through sysfs as being the source of wake-up, correct that.
Fixes: b3b708fa2780 ("wake up from a serial port") Signed-off-by: Florian Fainelli f.fainelli@gmail.com Link: https://lore.kernel.org/r/20230414170241.2016255-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Sasha Levin sashal@kernel.org
drivers/tty/serial/8250/8250_port.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 907130244e1f5..3d369481d4db1 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -19,6 +19,7 @@ #include <linux/moduleparam.h> #include <linux/ioport.h> #include <linux/init.h> +#include <linux/irq.h> #include <linux/console.h> #include <linux/sysrq.h> #include <linux/delay.h> @@ -1840,6 +1841,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) unsigned char status; unsigned long flags; struct uart_8250_port *up = up_to_u8250p(port);
- struct tty_port *tport = &port->state->port;
Looks like we need to drop this second declaration since we have the same one a few lines above. It did not show in the patch context, but it is there and it will cause:
drivers/tty/serial/8250/8250_port.c: In function 'serial8250_handle_irq': drivers/tty/serial/8250/8250_port.c:1845:19: error: redefinition of 'tport' struct tty_port *tport = &port->state->port; ^~~~~ drivers/tty/serial/8250/8250_port.c:1841:19: note: previous definition of 'tport' was here struct tty_port *tport = &port->state->port; ^~~~~