Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp234270rdb; Fri, 6 Oct 2023 01:37:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLdTmpZqdFcgRxBZTxX5fQC09AyTqEhgO0baUq3ENgX0EoVEOaBo52QLCb5s2bw0lNc9pg X-Received: by 2002:a17:90b:701:b0:26b:280b:d24c with SMTP id s1-20020a17090b070100b0026b280bd24cmr7146354pjz.42.1696581446826; Fri, 06 Oct 2023 01:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696581446; cv=none; d=google.com; s=arc-20160816; b=d6GUD7+ZVhZRv6JXikFpI3Yj06DZcI8LuToQFku+tfjKJ4IG4+SGxVRikdVS6iwcn5 UrCHrIenR9k0jvclVYpAjb7+EesCe3zDZ3LLaAdA52vN1ksIxHo68dtA06YcqGfEm0g3 XxOQr4swVS28p5QabPPhazae6UlPP9ec1lVRpxR8mcWoiqmOWq5J12cNl3P5srmy0Aco /ar2vjl9zhU4HSEkWi0pIbGLojGXr2G/guZnc7a3ebnaZSD+6fv4gXNl5gUnDQo44YpE NB5BdOyvEOoZQC1j2KJVTSfs6gdU56fytdpuV2mBQZSMVsa9bI2xf2Bbec4slRG1KL5P M4fQ== 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=hhbRYZ7ly4ojOHC8IYVU+WvPT8yaXySw8fmLK4PQf8s=; fh=VBsXOXbfgex2jiwEXIzzPMdynF9bWcCHidcLnhYxFD4=; b=mmJ6FVYUe6utCbdjhfrLgvJwcg35afWvfQnRfZa/IPVGXPptOKoQkvftsH34lJH22b svhYSGq/sn17gunCpB7WyAY5CW7jaYmqfg/E25jPvQ7Ia9s1mWYBjuFGx3kU99n0Zdk/ paEuyb6o2606LASMTjuKIp3OtLrcnGUTCdE91itTEIx0Azif6wl7JYREVJLdyRaSSDu7 kyiOZruCo18G5usEDIpcGumyC34lwLDRkM5MArqSwTN0MA0ENgyUQnFpxx9X5eC3I8WC aemkuY/Vgph68VojL+E5DLbW+A6Ow5N9U82hdd973Pe7DALakKsgX526m/1tWbdU3VzC HBAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bx24-20020a17090af49800b002774c17dd73si577107pjb.11.2023.10.06.01.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 01:37:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id A118F83A2BF8; Fri, 6 Oct 2023 01:37:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbjJFIhR (ORCPT + 99 others); Fri, 6 Oct 2023 04:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbjJFIhQ (ORCPT ); Fri, 6 Oct 2023 04:37:16 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3F0295; Fri, 6 Oct 2023 01:37:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 13D5F80E0; Fri, 6 Oct 2023 08:37:14 +0000 (UTC) Date: Fri, 6 Oct 2023 11:37:12 +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: <20231006083712.GJ34982@atomide.com> References: <20231005075644.25936-1-tony@atomide.com> <20231006072738.GI34982@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 01:37:23 -0700 (PDT) * Johan Hovold [231006 08:03]: > On Fri, Oct 06, 2023 at 10:27:38AM +0300, Tony Lindgren wrote: > > * Andy Shevchenko [231005 12:01]: > > > On Thu, Oct 05, 2023 at 10:56:42AM +0300, Tony Lindgren wrote: > > > > The serdev device and the serial core controller devices are siblings of > > > > the serial port hardware device. The runtime PM usage count from serdev > > > > > > I'm a bit lost in terminology here. > > > AFAIU there are: > > > 1) children of the serial physical device; > > > 2) siblings (to each other). > > > > > > But may be I mistakenly deciphered the diagram from the previous discussion. > > > > You're right, so how about: > > > > The serdev device and the serial core controller devices are children of > > the serial port hardware device. The runtime PM usage count from serdev > > device does not propagate to the serial core device siblings, it only > > propagates to the parent. > > That's still not accurate: > > - the serdev device is not a child (but a grandchild) of the serial > controller > - the new serial port devices are not "siblings" (but descendants) of > the serial controller > - the serdev controller ignores the power state of its children so that > bit is also incorrect > > You just want to describe the fact that the serdev controller runtime PM > state is currently not propagated to your new "devices" that are > descendants to the serial controller. OK so let's just use: The serdev controller runtime PM state is not currently propagated to the serial core controller port device. The runtime PM usage count only propagates to the parent device. > I'm still not sure why it was implemented this way, or if it is even > correct, but this seems to be the state of things. 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? Regards, Tony