Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 2/2] serial: core: fix console port-lock regression
Date: Fri, 18 Sep 2020 10:16:13 +0300
Message-ID: <20200918071613.GL7101@atomide.com> (raw)
In-Reply-To: <20200916122324.GG3956970@smile.fi.intel.com>

* Andy Shevchenko <andriy.shevchenko@linux.intel.com> [200916 12:34]:
> On Mon, Sep 14, 2020 at 11:09:16AM +0300, Tony Lindgren wrote:
> > * Andy Shevchenko <andriy.shevchenko@linux.intel.com> [200910 09:27]:
> > > +Cc: Tony, let me add Tony to the discussion.
> > > 
> > > On Thu, Sep 10, 2020 at 09:35:27AM +0200, Johan Hovold wrote:
> > > > And what about power management
> > > > which was the reason for wanting this on OMAP in the first place; tty
> > > > core never calls shutdown() for a console port, not even when it's been
> > > > detached using the new interface.
> > > 
> > > That is interesting... Tony, do we have OMAP case working because of luck?
> > 
> > 8250_omap won't do anything unless autosuspend_timeout is configured for
> > the uart(s). If configured, then the 8250_omap will idle when console is
> > detached and the PM runtime usage count held by console is decremented, and
> > the configured autosuspend_timeout expires.
> > 
> > The console is still kept open by getty, so I don't see why shutdown() would
> > be called for the console port. But maybe I don't follow what you're
> > concerned about, let me know if you want me to check something :)
> 
> Is it possible to test configuration when you have kernel console enabled but
> no getty is run on it (perhaps something with ssh enabled access)?
> 
> Then kernel console should call ->shutdown on detaching, right?

I gave this a quick try and Johan is right, shutdown is not called on console
uart still even if detached and no getty running on that uart. I could not
figure out easily where exactly this gets blocked.. So far I did try setting
port->console = 0 on detach, then init it again on attach.

Regards,

Tony

      reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 14:30 [PATCH 0/2] " Johan Hovold
2020-09-09 14:31 ` [PATCH 1/2] serial: core: fix port-lock initialisation Johan Hovold
     [not found]   ` <20200909152158.GC1891694@smile.fi.intel.com>
2020-09-10  7:08     ` Johan Hovold
2020-09-09 14:31 ` [PATCH 2/2] serial: core: fix console port-lock regression Johan Hovold
     [not found]   ` <20200909154815.GD1891694@smile.fi.intel.com>
2020-09-10  7:35     ` Johan Hovold
2020-09-10  9:27       ` Andy Shevchenko
2020-09-10 11:10         ` Johan Hovold
2020-09-14  8:09         ` Tony Lindgren
2020-09-16 12:23           ` Andy Shevchenko
2020-09-18  7:16             ` Tony Lindgren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200918071613.GL7101@atomide.com \
    --to=tony@atomide.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git