Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3576705rdg; Tue, 17 Oct 2023 22:08:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEM5jIL2YH6g2JI/DEmzVjQq+7osFmYJBL4gVccfgLMs7fX+cu0avlEhh0fnq9XHDk8BRxa X-Received: by 2002:a17:903:11cc:b0:1c9:c9ad:fab5 with SMTP id q12-20020a17090311cc00b001c9c9adfab5mr4807297plh.60.1697605681727; Tue, 17 Oct 2023 22:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697605681; cv=none; d=google.com; s=arc-20160816; b=0VcGwxhx0EBtOncYdEYBjBTp9ys5+No1NvWOS7zWOixUOE+9smg0F9Fzs49EVuy7Hg /de1dvxxqp2VxHs/pCvsid7q6LTWbOKKWYjqwQQCF9v0CI0xe+7q/YaNXv5LUbF6RMtE eqdZff6LJyPixxmx+vNq39/QI3qPQN693V9ngTd0gXuyGd72Px8ChNzhr0sq3KsjfAmg ndxu58vIFX31ZaxIcWpENQ3CztX3JQ4XR9aj5hnD93Lq10B6bJ7KcAoZ36AZNBlE7BRW n/xh3vBaq5pE5l0K9l0EABHRTJp2Hwj0Qju5ZUqH6ymB8QmD1U70DO0hd5CBmKCiTUOi 9I2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=hz0jFiTvPxpMAUhjzOsw8IG37ACeide1XG7PnJyOw6g=; fh=VBsXOXbfgex2jiwEXIzzPMdynF9bWcCHidcLnhYxFD4=; b=0xvAb9Lv1eKBOn48c4bM10Cc07RaDEW7qP/qn+DRF19IwpV0KWFCtlYZWsYw/GqgJX 8/YZxWCf14ZyYxY+HN1ODkgMZ2RlyZH8hGz9DHtVvpCl40Nj3mTVbJvzwZArJzVjIe8W GanxvLEqJ7bwuLNhb4lev8N8T9xoPV+hV/0T+Tsa806Y0qGN9hWQcfKem1S1z9ciZAXW v3MnZxGmdxAbKpjomXVGNzvneLgBFof5UYezEmOoPLj2z9i6LNOBZEvIb0ohOBua/yzr X3mZVijTdJLYi5MCheKyrCCzuSw5c85qruh1mQbNk1L/rCSe8hFusoZHa/HzmfMYxY93 apFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l4-20020a17090270c400b001c20db25108si1140579plt.41.2023.10.17.22.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 22:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC10D811F122; Tue, 17 Oct 2023 22:08:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235053AbjJRFH4 (ORCPT + 99 others); Wed, 18 Oct 2023 01:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235074AbjJRFHo (ORCPT ); Wed, 18 Oct 2023 01:07:44 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3749D12D; Tue, 17 Oct 2023 22:07:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E341F8027; Wed, 18 Oct 2023 05:07:28 +0000 (UTC) Date: Wed, 18 Oct 2023 08:07:27 +0300 From: Tony Lindgren To: Johan Hovold Cc: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Maximilian Luz Subject: Re: [PATCH] serial: core: Fix checks for tx runtime PM state Message-ID: <20231018050727.GI34982@atomide.com> References: <20231005075644.25936-1-tony@atomide.com> <20231006072738.GI34982@atomide.com> <20231006083712.GJ34982@atomide.com> <20231007054541.GL34982@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 22:08:00 -0700 (PDT) * Johan Hovold [231016 15:18]: > On Sat, Oct 07, 2023 at 08:45:41AM +0300, Tony Lindgren wrote: > > * Johan Hovold [231006 15:37]: > > > On Fri, Oct 06, 2023 at 11:37:12AM +0300, Tony Lindgren wrote: > > > > > Care to clarify a bit which parts are unclear? The hierarchy of port > > > > devices, making serial core manage runtime PM in a generic way, or > > > > flushing tx? > > > > > > I still don't know why you added these two new abstractions (controller > > > and port), and that isn't really explained by the commit message either. > > > > We want serial core to do runtime PM in a generic way and have the usage > > count propagate to the parent serial port hardware device. This way we > > don't need to care much if the numerous serial port drivers implement > > runtime PM or not. Well, except for now we need to check the parent state > > for this fix :) > > That sounds like a lot of complexity to avoid checking if (the single > instance of) pm_runtime_get() returns -EACCESS. Yes only one call so far. but we have the serial core generic PM patch(es) from Andy and Ilpo that are still coming. > > We also want serial core to know the serial port to serial port hardware > > mapping as we already have multiport devices. The serial core controller > > is there to group the serial ports for each serial port hardware device. > > We at least now have an option to support devices with multiple controllers > > and ports in case we ever happen to see such things. > > Hypothetical multiple serial controllers should be modelled as separate > controllers, but yeah, perhaps we want to describe the ports. Yes and we already have multiport controllers. > > > And if these are indeed needed, then why isn't the serdev controller now > > > a child of the "port" device, for example? > > > > Yes I agree we should now move serdev controller to be a child of the > > serial core port device. Then this $subject patch can be reverted. > > > > Moving serdev controller should also help serdev to deal with multiport > > devices I think? > > It wouldn't help currently I think, since we already resume the > controller and don't manage ports individually, but if we now have port > devices then it probably should be moved. I'll post a patch for that after some more checks. Regards, Tony