Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp165388lqe; Tue, 9 Apr 2024 19:35:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX03DN2XX+Mg6jXSwL1I1kRfaThSRTKKOuZEep/ckM9xstgmo8o3xsHSrcaMyaZ7KB3Nq0x+Yl84XhfhCmcmlTI69c8h/r1pfI1j0DlWA== X-Google-Smtp-Source: AGHT+IErLcGn7c8HqNQUbfvlOsLbtLhZAo4gCa7Fww7Skn6H6pM4ACqN8YZg+LebRfIgOcFnKFK+ X-Received: by 2002:a50:a6d2:0:b0:56d:f405:9a42 with SMTP id f18-20020a50a6d2000000b0056df4059a42mr783917edc.2.1712716504791; Tue, 09 Apr 2024 19:35:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712716504; cv=pass; d=google.com; s=arc-20160816; b=Z7T2xK8pAUfaNVbt8QmkwCAKDgPflxFQsjASwCskmWoxC1EVNVarhse3ggfK3uK2Uu wQAukNOYWybMK90jGwp/T5kM36wUANcs3R7iR33P1dIjWg5sOm9DnjFWqoqq8OUu2lQK BCLc7QmFvmu/bmx/aZmetWtJwTrFA4ePo3PnPwdu2PG33NntfqTjnAHj47WKuwOj7aSE M/18Os24I6xfJzAi2ydXZhqVo7+mYL/WxEIL7rkpvjo9b+bHB6yCWj0wx7eylaZiQqPO ectknBpw3LEMyd8ZzMM8oVOkDvPfU02y8BbBNFl83OPmpFmqdJY30VD0f07JbuYuAVsc +IaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WPo7/01sgagy07/rn4OAo5DyQZRXBkFvJyuKNG8pBG4=; fh=adk3EaFw7eFV07wvCPF33gGd3eJUi4dewVzMXztrQfc=; b=olEl2y5DRJMsBYCy224ZAwjw66ATkexVWPtLzgb0RbyvAysVIkXvxKdCMwa3YE4MiA m/dxNspYaXrB6xLfpIXA9LGHJ+/xBTa4IKWF9lfnKEnEfPaowmD2sWbLNOvfPw7Rx4hm ByTmE0R52+k5oCUUse3IfoJDD706Yp00+QIA4WFi8Becoo5wQxmzB5IWEh47i0vIbIY8 nOMtMxuM2txjQXiiVtZjq4ogTVTr1xdBCNGnQZSbpUnVe7m9RaL+L+u9zMHVW5vx8BKO B5/QSRFPzRNh8mS3zNK4kg+OI08jMuQfMzFFuGnCAjsQlZXpLuUj60Jl73kkYzODeic0 ekOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="j207AYj/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137847-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 26-20020a508e1a000000b0056c37da48b3si5316822edw.98.2024.04.09.19.35.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 19:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137847-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="j207AYj/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137847-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7B3B21F22C01 for ; Wed, 10 Apr 2024 02:35:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F4C6C13B; Wed, 10 Apr 2024 02:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="j207AYj/" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49A30443D; Wed, 10 Apr 2024 02:34:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712716487; cv=none; b=Gze6PmO+XzjTt68VGOM5/zllHQ8zyDhonVdoyDkiOgSndSRxDVSAiWT3HFKtjl9an/uGNqWrZzYTGv5oHz1n+kzqOkosf51vQnAKbpCwZCqRCSgXvhGYQY9Pv2XYOpmzWYgPalxXBKWe3bbkh4HRuIgNd7D7SO5vRpRwh9lk2mQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712716487; c=relaxed/simple; bh=obH8pri35IMIPHiw0rnrgYA4QrSMOsXif7LAyLVLGB0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lXO0v2ib5oqBMR3zXtknkBqNXZQFVdoAYneP/AWVLKyuJ5cyiKAa7v2eQ9PSbWaTqv/SESC2Oqin4tnrFVES/UflaBdsxIVMjhSedlGQ9b/W/mm4W9Kj6xhq1ETzaRVLOv2++VMgcJAi6XHzgxVQhPibXXxSQLtIvGqPICBEChE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=j207AYj/; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712716487; x=1744252487; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=obH8pri35IMIPHiw0rnrgYA4QrSMOsXif7LAyLVLGB0=; b=j207AYj/M9WDmWFONmDfypYTPio64PkH4M2pAzsmNlqLi7VpGZWVBY4Q YRGHxz+BVrly1qd8VB+El0Yar2to9Bj1+y0FjetbKZjXz5kguSY+NwTLR ll0N9HcdrJ3bPr+3POZeGnhe3ZybprORkSPdBZNDua/aQRRrfc9VWnq79 HMJtOBq/2cQTEywB+2VhrLj4Vx442ruHPpVhVvr+MEwmsgtqqAtna2+6/ 5gJLmQAdZSStbJ98CK40kUtGfpRLj74mJKGopGgI1scMbPqNIhUTewm3l qtodJTMTxSELbCq2T+WkUKHcwUqxGDH+9yBeVDsqyDckeHjDKUzJIdiRM A==; X-CSE-ConnectionGUID: Dcc+fXY4TG26QBT9RUsbWw== X-CSE-MsgGUID: UjlgGBg+RRC78/mgtAcjqA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="11900172" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="11900172" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 19:34:44 -0700 X-CSE-ConnectionGUID: foB0regWTUimANlQnBFcWQ== X-CSE-MsgGUID: yyTcIY9BQM2aAHkseN552A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="43658577" Received: from yungchua-ws.ostc.intel.com (HELO yungchua-ws.intel.com) ([10.54.69.90]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 19:34:44 -0700 From: Bard Liao To: linux-sound@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, tiwai@suse.de Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com Subject: [PATCH 2/4] soundwire: intel_auxdevice: use pm_runtime_resume() instead of pm_request_resume() Date: Wed, 10 Apr 2024 02:34:36 +0000 Message-Id: <20240410023438.487017-3-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410023438.487017-1-yung-chuan.liao@linux.intel.com> References: <20240410023438.487017-1-yung-chuan.liao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit We need to wait for each child to fully resume. pm_request_resume() is asynchronous, what we need is to wait synchronously to avoid race conditions. Signed-off-by: Bard Liao --- drivers/soundwire/intel_auxdevice.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c index 95125cc2fc59..012232cfbf7f 100644 --- a/drivers/soundwire/intel_auxdevice.c +++ b/drivers/soundwire/intel_auxdevice.c @@ -454,9 +454,9 @@ static int intel_resume_child_device(struct device *dev, void *data) return 0; } - ret = pm_request_resume(dev); + ret = pm_runtime_resume(dev); if (ret < 0) { - dev_err(dev, "%s: pm_request_resume failed: %d\n", __func__, ret); + dev_err(dev, "%s: pm_runtime_resume failed: %d\n", __func__, ret); return ret; } @@ -499,9 +499,9 @@ static int __maybe_unused intel_pm_prepare(struct device *dev) * first resume the device for this link. This will also by construction * resume the PCI parent device. */ - ret = pm_request_resume(dev); + ret = pm_runtime_resume(dev); if (ret < 0) { - dev_err(dev, "%s: pm_request_resume failed: %d\n", __func__, ret); + dev_err(dev, "%s: pm_runtime_resume failed: %d\n", __func__, ret); return 0; } -- 2.34.1