Message ID | 20240104130123.37115-5-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5596531dyb; Thu, 4 Jan 2024 05:05:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVDuGp0MQ2JyOCB+4Vo8YAq1HMm+89roZ61UCHO6AtwV4S0FWUW53zq/v9v+o3zcE/oeIn X-Received: by 2002:a05:6808:3388:b0:3bb:c76f:f82a with SMTP id ce8-20020a056808338800b003bbc76ff82amr509726oib.64.1704373513215; Thu, 04 Jan 2024 05:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704373513; cv=none; d=google.com; s=arc-20160816; b=San3iqfEDPuzKUn9oUB5x2LGgrQe10oJjQaTbPySPF1AhAuY0xczqmRTUZBCOW9N1Z J2RFSZ8PHm+tlTESRAd9mz2SUthNPjb7CKDoDuRHk3uWQZXn2WP4mOfA9XO9OFAlH6hC 1PQGiCuTBqwj95Rylm7rkEvvxMsAvk1augTybI4G2RIJsGA1KIxrUXW+44XqDB4J5qkq dBvK1N81TeVovbU0BCGI69eVjr3X0qWFjyH+l8+qhunw1JRBQcP2S8FQJboLrdHMB+F2 AC17PE/VVXKlD2R36NMa3PYTrxcUOrv7qCDzk7QzafTiZl2fgjwhihQg5omPANYpW84B MPYw== ARC-Message-Signature: i=1; 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=ko9AldsNAGIySQ6r8IsXSCtLQ9r/1ys0AWCrWCqKA/w=; fh=1uFngekeZT2FVGQaKpK4gjTIex4FU0hdfexTfOUKej8=; b=fWC82vXCH2MlTMz2bUUYRSQmm/3OaHr/ymn/5iuR6bQdz3LficcNWA6kdh2OSS1j+B i49x043wniAax6j5sE4/fBWBc3KcRFdQAaLIa2BbggT89/4mhNQoWGcTMTBGuDOE7pXM Ko+O1zKKfJUB8Zc+b2/VUxoPVJ2sSzWdw8C8dKVDyAw88BnlOjGe3jG/HEOWtOkrABcW m78GDxha6g4KLUv7Bsnw4rDJSUKriC+ajD8GnZLAgJPr1MA5j64U71tqCXkPxJxOE91h gIBAti/a3fm0Lxollf4Nd24oeIbrxz1dcaDQFUYWM4WXfzP9tAnGAgWx6/V5MG+AGQs0 rltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=qDAKAE9T; spf=pass (google.com: domain of linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r15-20020a67cd8f000000b004678a9e241bsi567442vsl.568.2024.01.04.05.05.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:05:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=qDAKAE9T; spf=pass (google.com: domain of linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16678-ouuuleilei=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F28301C21378 for <ouuuleilei@gmail.com>; Thu, 4 Jan 2024 13:05:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B5AF24B29; Thu, 4 Jan 2024 13:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="qDAKAE9T" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52A9123749 for <linux-kernel@vger.kernel.org>; Thu, 4 Jan 2024 13:02:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3373bc6d625so365427f8f.3 for <linux-kernel@vger.kernel.org>; Thu, 04 Jan 2024 05:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373328; x=1704978128; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ko9AldsNAGIySQ6r8IsXSCtLQ9r/1ys0AWCrWCqKA/w=; b=qDAKAE9TbUQIkcoKTZtSY0WnsUGIVQYmcduoDIK0xckAbAwmxwmFXB4AWvibjMdYYo aHW7vr9A+l3jDthupCARLI5lxAm3VBqCodkR7/R4H4D0/iCjyAgskyFjHHXw5R1/wnRb L6xinfTzmbRP5M8plryQr/jzRPFgvnrY2jN5ymG+7Mx9CX1P3DSNnkUfXmswZOKE2S9h 8hiiEjZCIFevEUYRcAddjo5IoeH53GKB+12G6Mta0Zhq9roMq7itKAXT9BzZXnmn7IsP 6OkbDcLCHnsulClebByr5ufXmmymyNSC+LY46xZFukP9mrdmqSSepY+Sd4DKvqqBfj7D gDLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373328; x=1704978128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ko9AldsNAGIySQ6r8IsXSCtLQ9r/1ys0AWCrWCqKA/w=; b=RY/MtOZSicvUwn+cD3KPxYSRDPnjUeglLj/Bkp2Uq91n+oJ7SLIHb/6tZh/YpfJZCK C3Z0/tWtTm/JiXO+n7Ywfw6QPvJ6+91sFClvjhGyDmz90HXKXBlNhoPa/JFDqYWX7Dm3 u7JnXFTd+CECvCkAOXtHn3L3FKatt7I8wrz5HsTnRCFd0X/pCp8xPVc2qbuLxKKup55d ZrKLwtQSL6a7schSYASB5Sx64ffX4Nb/O8r2a4Er+vHRAYKf5QTvoX3/W6YWrMyqmR8z A6vrqWBL5riFaMdTErmEnFv2eK9RLLWZo4XFL0cWAALSvZ5uXWViycwStODDZwg1Ily+ uxjw== X-Gm-Message-State: AOJu0YxWEN+T3EKKDuaKAyfppZplYZ6/xc8xivTXS2XBAQ5/uogXEJbp R+biBh1Dyw2rvMJxtJ613y8jxdqZc350xg== X-Received: by 2002:adf:f1c7:0:b0:336:7f93:3dcc with SMTP id z7-20020adff1c7000000b003367f933dccmr292279wro.81.1704373328663; Thu, 04 Jan 2024 05:02:08 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:08 -0800 (PST) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Kalle Valo <kvalo@kernel.org>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Heiko Stuebner <heiko@sntech.de>, Jernej Skrabec <jernej.skrabec@gmail.com>, Chris Morgan <macromorgan@hotmail.com>, Linus Walleij <linus.walleij@linaro.org>, Geert Uytterhoeven <geert+renesas@glider.be>, Arnd Bergmann <arnd@arndb.de>, Neil Armstrong <neil.armstrong@linaro.org>, =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= <nfraprado@collabora.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Peng Fan <peng.fan@nxp.com>, Robert Richter <rrichter@amd.com>, Dan Williams <dan.j.williams@intel.com>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, Terry Bowman <terry.bowman@amd.com>, Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Huacai Chen <chenhuacai@kernel.org>, Alex Elder <elder@linaro.org>, Srini Kandagatla <srinivas.kandagatla@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [RFC 4/9] PCI: hold the rescan mutex when scanning for the first time Date: Thu, 4 Jan 2024 14:01:18 +0100 Message-Id: <20240104130123.37115-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787165160941455276 X-GMAIL-MSGID: 1787165160941455276 |
Series |
PCI: introduce the concept of power sequencing of PCIe devices
|
|
Commit Message
Bartosz Golaszewski
Jan. 4, 2024, 1:01 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> With the introduction of the power sequencing drivers that will be able to trigger the port rescan, we need to hold the rescan mutex during the initial pci_host_probe() too or the two could get in each other's way. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/pci/probe.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b7335be56008..957f7afee7ba 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -3122,7 +3122,9 @@ int pci_host_probe(struct pci_host_bridge *bridge) struct pci_bus *bus, *child; int ret; + pci_lock_rescan_remove(); ret = pci_scan_root_bus_bridge(bridge); + pci_unlock_rescan_remove(); if (ret < 0) { dev_err(bridge->dev.parent, "Scanning root bridge failed"); return ret;