Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp798715rdb; Fri, 6 Oct 2023 22:46:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6Gi4eU+tqqn8JzKs+B5vrNHeciYI5rI1y7qCmOFH2Z7c3dU3YdLbp/dAxthMe5A4Olmle X-Received: by 2002:a17:902:bc4b:b0:1c5:df3f:89e5 with SMTP id t11-20020a170902bc4b00b001c5df3f89e5mr10587088plz.62.1696657608117; Fri, 06 Oct 2023 22:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696657608; cv=none; d=google.com; s=arc-20160816; b=hRZE+lNkmIf/OLbewoZZWbBCUh6RsdQ25PFUmin2BFW0Etjz0EgKbowlSGQtyB7WnA 6MrN9Nire417rrPaPnEfC9GollziL89IL/JSGEt4QLUi2Bc/voooI7GImNEex2i2asTZ e2oBEvbfRyTmMboaCS1GFjThVaGqd573TEzfLE0WyrvfYQX36efv0ssMJCagBfw5xMg0 SoqX0QpXqFiiyEL25vFr5pVCR9wHuV8aUCEHxRkHtIxtlnMkmjjWfnkWgo6ipeSQuz4z MfgzVUh+OwhF2oYlp/QhmzOorwtCwWhL7X8tcfH5FT8gWc1h19QPt1kvGHDFCWMoLY1f lfVg== 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=jI5ucuMEBDok07OL0D5Sf37PtkVsWO1ynPxuqskwjXQ=; fh=VBsXOXbfgex2jiwEXIzzPMdynF9bWcCHidcLnhYxFD4=; b=f+R/2hBWmVwD7lo37UX9I4rXABM+Fv6coZQ7FLpzC+oryNK+ZPKCSyN2FoKBnE03iz q0kXGVi2P0lV15tXMS7JPeWBMgX4sNlQC79N0JdQdSbAFJ9ZjkcCOBC6o4vAdOhFlncQ Kl7E0yRap/e3UflksAEyI5bLJdGhGpY9qF9+uJ6yfjkz2dCkNy/wzxMnifEpfwyYI0tc tqyWfwdLUU8Z0j+Ql2SuW6xQc2Lw7yzhA5Vzu/5f27Ov7DITx1CTJR37BJyo5QqGK1yv fm7tO60YXoeCN2SOnlKGAdQ3Ed+Jqp85yQEY/Z1kmVprq796sTK7qi2jvRR78EiMpdVh Mybg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kp15-20020a170903280f00b001c446f12975si4816433plb.447.2023.10.06.22.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 22:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 00C3483FC9E7; Fri, 6 Oct 2023 22:45:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343542AbjJGFpt (ORCPT + 99 others); Sat, 7 Oct 2023 01:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233675AbjJGFpr (ORCPT ); Sat, 7 Oct 2023 01:45:47 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A372BB; Fri, 6 Oct 2023 22:45:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A15F380E0; Sat, 7 Oct 2023 05:45:42 +0000 (UTC) Date: Sat, 7 Oct 2023 08:45:41 +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: <20231007054541.GL34982@atomide.com> References: <20231005075644.25936-1-tony@atomide.com> <20231006072738.GI34982@atomide.com> <20231006083712.GJ34982@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 22:46:00 -0700 (PDT) X-Spam-Level: ** * Johan Hovold [231006 15:37]: > On Fri, Oct 06, 2023 at 11:37:12AM +0300, Tony Lindgren wrote: > > 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. > > That sounds better. OK > > > 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? > > 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 :) 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. > 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? In the long run serial port specific functions could live there too. > There are just a lot of questions and I worry that there are more > problems lurking, but unfortunately I still don't have time to review > this. Well incremental steps should be easier to do now. Regards, Tony