From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D18CC43464 for ; Fri, 18 Sep 2020 07:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17FC221741 for ; Fri, 18 Sep 2020 07:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726044AbgIRHUY (ORCPT ); Fri, 18 Sep 2020 03:20:24 -0400 Received: from muru.com ([72.249.23.125]:44820 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgIRHUY (ORCPT ); Fri, 18 Sep 2020 03:20:24 -0400 X-Greylist: delayed 301 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Sep 2020 03:20:24 EDT Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 823FC8005; Fri, 18 Sep 2020 07:15:24 +0000 (UTC) Date: Fri, 18 Sep 2020 10:16:13 +0300 From: Tony Lindgren To: Andy Shevchenko Cc: Johan Hovold , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable Subject: Re: [PATCH 2/2] serial: core: fix console port-lock regression Message-ID: <20200918071613.GL7101@atomide.com> References: <20200909143101.15389-1-johan@kernel.org> <20200909143101.15389-3-johan@kernel.org> <20200909154815.GD1891694@smile.fi.intel.com> <20200910073527.GC24441@localhost> <20200910092715.GM1891694@smile.fi.intel.com> <20200914080916.GI7101@atomide.com> <20200916122324.GG3956970@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916122324.GG3956970@smile.fi.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Archived-At: List-Archive: List-Post: * Andy Shevchenko [200916 12:34]: > On Mon, Sep 14, 2020 at 11:09:16AM +0300, Tony Lindgren wrote: > > * Andy Shevchenko [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