lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <AS8PR04MB84184AE558E7D4412D8BDCA9921CA@AS8PR04MB8418.eurprd04.prod.outlook.com>
Date: Wed, 24 Sep 2025 02:49:36 +0000
From: Sherry Sun <sherry.sun@....com>
To: Frank Li <frank.li@....com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jirislaby@...nel.org" <jirislaby@...nel.org>, Shenwei Wang
	<shenwei.wang@....com>, Peng Fan <peng.fan@....com>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>
Subject: RE: [PATCH] tty: serial: fsl_lpuart: Add missing wakeup event
 reporting



> -----Original Message-----
> From: Frank Li <frank.li@....com>
> Sent: Wednesday, September 24, 2025 3:32 AM
> To: Sherry Sun <sherry.sun@....com>
> Cc: gregkh@...uxfoundation.org; jirislaby@...nel.org; Shenwei Wang
> <shenwei.wang@....com>; Peng Fan <peng.fan@....com>; linux-
> serial@...r.kernel.org; linux-kernel@...r.kernel.org; imx@...ts.linux.dev
> Subject: Re: [PATCH] tty: serial: fsl_lpuart: Add missing wakeup event
> reporting
> 
> On Tue, Sep 23, 2025 at 10:10:51PM +0800, Sherry Sun wrote:
> > Current lpuart wakeup event would not report itself through sysfs as
> > being the source of wakeup, so add pm_wakeup_event() to support this.
> 
> Current lpuart wakeup event would not report itself as wakeup source
> through sysfs. Add pm_wakeup_event() to support it.
> 
> >
> > Signed-off-by: Sherry Sun <sherry.sun@....com>
> > ---
> >  drivers/tty/serial/fsl_lpuart.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/tty/serial/fsl_lpuart.c
> > b/drivers/tty/serial/fsl_lpuart.c index c9519e649e82..9625997758e1
> > 100644
> > --- a/drivers/tty/serial/fsl_lpuart.c
> > +++ b/drivers/tty/serial/fsl_lpuart.c
> > @@ -3087,7 +3087,9 @@ static int lpuart_suspend_noirq(struct device
> > *dev)  static int lpuart_resume_noirq(struct device *dev)  {
> >  	struct lpuart_port *sport = dev_get_drvdata(dev);
> > +	struct tty_port *port = &sport->port.state->port;
> >  	u32 stat;
> > +	bool wake_active;
> 
> move wake_active above u32 stat;.
> 
> >
> >  	pinctrl_pm_select_default_state(dev);
> >
> > @@ -3098,6 +3100,12 @@ static int lpuart_resume_noirq(struct device
> *dev)
> >  		if (lpuart_is_32(sport)) {
> >  			stat = lpuart32_read(&sport->port, UARTSTAT);
> >  			lpuart32_write(&sport->port, stat, UARTSTAT);
> > +
> > +			/* check whether lpuart wakeup was triggered */
> > +			wake_active = stat & UARTSTAT_RDRF || stat &
> UARTSTAT_RXEDGIF;
> 
> wake_active = stat & (UARTSTAT_RDRF | UARTSTAT_RXEDGIF);

Hi Frank, thanks for all above comments, will implement them in V2.

Best Regards
Sherry

> 
> Frank
> > +
> > +			if (wake_active &&
> irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)))
> > +				pm_wakeup_event(tty_port_tty_get(port)-
> >dev, 0);
> >  		}
> >  	}
> >
> > --
> > 2.34.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ