Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2479323imn; Tue, 2 Aug 2022 04:33:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1unAfdPDuNazzkKT9g+A1yn07E7flmwjuGpornlBTmwRuG0fSTidEdC8aR4oNpvXnuAOXXA X-Received: by 2002:a05:6a00:14d2:b0:52a:d2a1:5119 with SMTP id w18-20020a056a0014d200b0052ad2a15119mr20367252pfu.36.1659439983491; Tue, 02 Aug 2022 04:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659439983; cv=none; d=google.com; s=arc-20160816; b=EhnTbe5/gjDdIs77lSFo7o4OBxCcaGIXAIGRdR0BMrMYuFkETl8jaTETOMDPm4sifZ QoRQaaXjtjatksMPazHQa6HDiacykP/VbRbekFhOT3JlOp6qL5dNU7U8k2W+PnJZ5r3t 7J7NKKpEcfsRWSE3I1skolMR6CMxFDLEtU+PQC8Boqvdi4maQlvmtz52LEDKmnqFAET8 2K1DzNHjwjtuB4gS/4pE3sOL6dUWrFC7RRqd+5R7H/RhZ35WSrQdeGMa4rhqOkHSJO1T bw0VQhH+YpHl+nRdYIm8f+xQvk6f5Rwiizurw9srxNTYLPblv5tNlGlF4v+RSrkTyZD9 VWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=u56ky1itKQ0F3dnJn7huu8Yqx+Y2BBrDNofqx/cbRmA=; b=L/ODoVj/ptNPvstVUdCEwuYftRzN7eubP51SVpDxnZ57pDQA+1ATLh4hyrx4AVYkdP cuMFQ95+u0k2MQesdRW7WPinWFEbJoHz2IqJxzbQqBpXSpB1RHfuuOTMZhBWMw8oc6ZC 4fmUwhNakXFVjhIT6jylszxedYwodo5TJPn+ZGELfU/cGUhvnqr4bxhFzRNy/MXS19c7 FbS5/ttIUVqtfzYeaNK9n/e3p+TDzwYyzWdaB3sojdqas01LQvFUehxDTPdVDaXVnhAl 36ORGwbdL/tjTlz5y0caeB/k4VSnYfZZ7+WDx1O2LWF07cjMP1UzM/DL2etofnw8q2zM IFZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g62-20020a636b41000000b0041c35254232si4175327pgc.869.2022.08.02.04.32.48; Tue, 02 Aug 2022 04:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236664AbiHBLBn (ORCPT + 99 others); Tue, 2 Aug 2022 07:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233950AbiHBLBk (ORCPT ); Tue, 2 Aug 2022 07:01:40 -0400 Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A35EDD; Tue, 2 Aug 2022 04:01:39 -0700 (PDT) Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-32194238c77so136608137b3.4; Tue, 02 Aug 2022 04:01:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=u56ky1itKQ0F3dnJn7huu8Yqx+Y2BBrDNofqx/cbRmA=; b=MH4rUtsLZfVKhnTSLZ6lYDlccfp/pdLgN/1mzpPM0Nt6QOI88FjQu4h1PMtuytdl8c 2F6Oklqxquhkm9yddGYf7vhsUIIZXQKyJkTSJqWIwDKQWzUNUup2OoUxZpdyD28wSVBA fnk3P6q/oG3Ih6Ldo19DP/fDz0vbbxBuAgapY0KSM2JRB7EX7JC5Qw7FrxYHETj4aZAk uTsBj21erVFqdrkeUCX8Uj/Tq1qlW7hTz9A3Xv+UVIeLTn6n+22/9dCt+9lRWee8ezJr s41ms6H/gyWbi7lPwgLl+/22PRzHZga+9cPOWSYiVcEz7T+28h665JecCL83zS/bhs43 h81g== X-Gm-Message-State: ACgBeo242JNK/x3s5CySbkw+6VkIQkBIRh9aOc0EpDooINooE4E2ZwsC irv3V5fMMYZd1JHnDkwMlsWtu/9eqYMfKbK+2C4= X-Received: by 2002:a81:8847:0:b0:325:314d:7787 with SMTP id y68-20020a818847000000b00325314d7787mr3674001ywf.19.1659438098815; Tue, 02 Aug 2022 04:01:38 -0700 (PDT) MIME-Version: 1.0 References: <20220613120755.14306-1-peter.wang@mediatek.com> <12028598.O9o76ZdvQC@kreacher> <90b5f619-2dd6-817b-fe2d-f895be0b5b98@mediatek.com> <7c3ec17e-296f-ab15-6055-fd59a7d8f036@mediatek.com> <5c9a3908-a2c6-76d7-db6d-d762503d640a@mediatek.com> In-Reply-To: <5c9a3908-a2c6-76d7-db6d-d762503d640a@mediatek.com> From: "Rafael J. Wysocki" Date: Tue, 2 Aug 2022 13:01:21 +0200 Message-ID: Subject: Re: [PATCH v1] PM-runtime: Check supplier_preactivated before release supplier To: Peter Wang Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux PM , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 2, 2022 at 5:19 AM Peter Wang wrote: > > > > Hi Rafael, > > > > Yes, it is very clear! > > I miss this important key point that usage_count is always > > > rpm_active 1. > > I think this patch could work. > > > > Thanks. > > Peter > > > > > > > > > Hi Rafael, > > After test with commit ("887371066039011144b4a94af97d9328df6869a2 PM: > runtime: Fix supplier device management during consumer probe") past weeks, > The supplier still suspend when consumer is active "after" > pm_runtime_put_suppliers. > Do you have any idea about that? Well, this means that the consumer probe doesn't bump up the supplier's PM-runtime usage counter as appropriate. You need to tell me more about what happens during the consumer probe. Which driver is this?