Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3421496rwo; Fri, 4 Aug 2023 04:52:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjAyYvUl2tQdnoUN0/TCkSkYCRx0QO3UusBiSmUxAvGxgS1OKYf7W0/YGSXXsypWtbe/Cb X-Received: by 2002:a05:6402:1d51:b0:522:28b9:e84c with SMTP id dz17-20020a0564021d5100b0052228b9e84cmr1657000edb.21.1691149967550; Fri, 04 Aug 2023 04:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691149967; cv=none; d=google.com; s=arc-20160816; b=WURJQwXBOoZX1nhAHdU8W4blQdGEICfo8lWZhm9gRJPdwhxawbF6ofXrit/XgqBUm4 hBiNujVc2WpnXNUsZfdk8TRkFJZsEe1nXMRAn4L1bO/b48d1u3ycI4zdH0w9Sjm6+BkH KKegbKkigcTnbmM6WvZdovC+rLQcYFN2pumK3IxjeiQwxcZ9ihAo+SYlqfawtZe96ZVd nFFfw7lsu7K0V7N9h1p9cejo4UWiNzLEq8VQGvC0c2ajR0UX4T4rjClU/D8DSAyosAjB yXRenZC2/uoJvRI/VV7XEJok08QwIwPw2LWoCj/P1xNOliaZMs1U2HMXSbAVJqKf5ZqT VVZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OCofsKAt8Ejf/ZSErfSKkZTlVh+VkY8Gp9t1OATALhU=; fh=HyGECySvD3yVtjZ6q5Hy57q6SEk9zxUwYVzUQq0+xK8=; b=y3RVQjM0sPLle8QbyVSMZVZT+XpKmShk7zX3/bH9XyPCkfHD32hzu05sPDN4YWBQzQ pkPkSyM0RYlNVyRpZgxAMJh6C7un2GUT6lnccdgyi4ljvArlrGHmjgFQFUSYB11akT6M VXoF5nVmj/VZB4au+rZtDXudAQumTWaErqjFPazHCBYoo8ZXDSDd04sd+efJnqMJzrOL PrOZWHicGjp5Xn9qfZw6SUad6W0hf2B04VLM8XC4cV1NAMueHpcwtrx2VmLDAMEx/hwd DyL1w1SBdGV05wjqhrYZTetxnRNfb8kMzK7AiZALBWvOTqqrMIghhXcf5J/WRJwmZuna Iu3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=e87WDpxx; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j23-20020a50ed17000000b005230def7054si1466496eds.364.2023.08.04.04.52.22; Fri, 04 Aug 2023 04:52:47 -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; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=e87WDpxx; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231164AbjHDJpS (ORCPT + 99 others); Fri, 4 Aug 2023 05:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231173AbjHDJpN (ORCPT ); Fri, 4 Aug 2023 05:45:13 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA62849EC for ; Fri, 4 Aug 2023 02:45:10 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3749DbxH023497; Fri, 4 Aug 2023 04:45:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=PODMain02222019; bh=OCofsKAt8Ejf/ZS ErfSKkZTlVh+VkY8Gp9t1OATALhU=; b=e87WDpxxvOBWRKRQkJnFWJiJp5FENic zXL9c3OJz6TXOoxGGsvqMezw0FwELxewAIx5nh//pzItg5BJ0z0J7BlPHgujB5Rz 2Tw+1M8KmKgD+7nPE5vrhDkXrFbQwydit7HBaFcDlkLNByue86sn9Y+C9yvk91tz VfA0e2hFMjUko00+2RO/NWly31haOkROXpyogiLEX5cDvNbsTPcaEnr0NRVaqSGp 7MyBp1UXpJ6qLoZKWaQEQU55vx0mqP0cpAII5PF579VP7w9mm8eKfNsDAYWB17yp JHc3mFlEkq+bhFDdtFmiNfdykM1q8is0ubvseKAbRFNPe6cJTHOhWvA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3s4y6jwjn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Aug 2023 04:45:01 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 4 Aug 2023 10:45:00 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.30 via Frontend Transport; Fri, 4 Aug 2023 10:45:00 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id F14D33563; Fri, 4 Aug 2023 09:44:59 +0000 (UTC) Date: Fri, 4 Aug 2023 09:44:59 +0000 From: Charles Keepax To: Bard Liao CC: , , , , , Subject: Re: [PATCH 2/2] soundWire: intel_auxdevice: resume 'sdw-master' on startup and system resume Message-ID: <20230804094459.GS103419@ediswmail.ad.cirrus.com> References: <20230803065220.3823269-1-yung-chuan.liao@linux.intel.com> <20230803065220.3823269-3-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230803065220.3823269-3-yung-chuan.liao@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: _2qWJouHkS0ldpw8Pj0ZAC4yyfVIg6Po X-Proofpoint-ORIG-GUID: _2qWJouHkS0ldpw8Pj0ZAC4yyfVIg6Po X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 On Thu, Aug 03, 2023 at 02:52:20PM +0800, Bard Liao wrote: > From: Pierre-Louis Bossart > > The SoundWire bus is handled with a dedicated device, which is placed > between the Intel auxiliary device and peripheral devices, e.g. > > soundwire_intel.link.0/sdw-master-0/sdw:0:025d:0711:01 > > The functionality of this 'sdw-master' device is limited, specifically > for pm_runtime the ASoC framework will not rely on > pm_runtime_get_sync() since it does not register any components. It > will only change status thanks to the parent-child relationship which > guarantees that the 'sdw-master' device will be pm_runtime resumed > before any peripheral device. > > However on startup and system resume it's possible that only the > auxiliary device is pm_runtime active, and the peripheral will only > become active during its io_init routine, leading to another > occurrence of the error reported by the pm_runtime framework: > > rt711 sdw:0:025d:0711:00: runtime PM trying to activate child device > sdw:0:025d:0711:00 but parent (sdw-master-0) is not active > > This patch suggests aligning the sdw-master device status to that of > the auxiliary device. The difference between the two is completely > notional and their pm_status shouldn't be different during the startup > and system resume steps. > > This problem was exposed by recent changes in the timing of the bus > reset, but was present in this driver since we introduced pm_runtime > support. > > Closes: https://github.com/thesofproject/linux/issues/4328 > Signed-off-by: Pierre-Louis Bossart > Reviewed-by: Ranjani Sridharan > Reviewed-by: Rander Wang > Signed-off-by: Bard Liao > --- Tested-by: Charles Keepax Thanks, Charles