Re: [PATCH v2] serial: port: Don't suspend if the port is still busy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> [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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux