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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240206132155.GH5185@atomide.com>
Date: Tue, 6 Feb 2024 15:21:55 +0200
From: Tony Lindgren <tony@...mide.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Yicong Yang <yangyicong@...wei.com>, gregkh@...uxfoundation.org,
	jirislaby@...nel.org, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org, john.ogness@...utronix.de,
	tglx@...utronix.de, yangyicong@...ilicon.com, linuxarm@...wei.com,
	prime.zeng@...ilicon.com, jonathan.cameron@...wei.com,
	fanghao11@...wei.com
Subject: Re: [PATCH v2] serial: port: Don't suspend if the port is still busy

* Andy Shevchenko <andriy.shevchenko@...ux.intel.com> [240206 13:12]:
> > static int serial_port_runtime_suspend(struct device *dev)
> > {
> > 	int ret;
> > 	...
> > 	uart_port_lock_irqsave(port, &flags);
> > 	ret = __serial_port_busy(port);
> > 	if (ret)
> > 		port->ops->start_tx(port);
> > 	uart_port_unlock_irqrestore(port, flags);
> 
> > 	if (ret)
> > 		pm_runtime_mark_last_busy(dev);
> 
> And obvious question here: why in case of 0 we can't mark this as busy as well?
> I.o.w. why do we need to mark it only when error is set?

No need to call in the 0 case. The last time driver was busy
was when pm_runtime_mark_last_busy() was called, and in the 0 case
we just runtime suspend based on the autosuspend timeout value.

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ