From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0EC6A35471E; Tue, 11 Nov 2025 10:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762858287; cv=none; b=TJgizD/KCg6bCeI/3nolanukmxWUHid41njreOZOXwqPgNpmp8MIYv6Fgc5IUOMVQYY/vkGZIvBNHkpLjQa5kE7R2Zyw5hQ4wysgawr9kLuZgNQT0spMNqg2a3xV9DR3H4vn/dM4/Y9TChgXTQqA87Y6uGgfa1WExb6mAiydPAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762858287; c=relaxed/simple; bh=dxfl6VKXp5ljUeoqAAoIb/M0SIKNtJ0w3TrOAdaiob0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O2cJwwXXWdELjW562W69f8P2bbXR2JY5XI8ryFVtam0MAa6FGGR6EzM4SOoSczFMiIQIoKS1FE9Mn2wTfOxHtX3ZSKj7e0Q5Y07pAlI7xPrN98SVpLyznIuxN5Jzkjz5/WnnHY2vhvh6Zvf/rtEVvzsyrzyOK7fuYlV/NhYpA0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Febl/yQY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Febl/yQY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00E7EC4CEFB; Tue, 11 Nov 2025 10:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762858286; bh=dxfl6VKXp5ljUeoqAAoIb/M0SIKNtJ0w3TrOAdaiob0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Febl/yQYWOqrQU82DWyMCC/zwpFhtYgStT1jy2pHJVTCmR2v8QkLJNNte7d3QtHfl WFJmeX3gov673BAgbSlSvs6HelKYFxZaHK3II/KEHtznLc3HXMv8yH+x+HxzDEERbd FAml/YXDDzSxmmfhaDwvxDyW5KWTM6UW8zBDpVl400J7q7Ml8O8+iO10vwGA2baWz4 eHXBb4P/AA0V26GpERE0lujaifh0jB6/xNJLL6070iHzzaCAZPiza0uK+X3pAguztM 3nykEc99aGrsNzHUockslweXbpIBEl1ka8E9XwRr1vMdZSbT9kj66MnMB4Zo3GoBPW TqrcfZ2K/6ghQ== From: Niklas Cassel To: Manivannan Sadhasivam , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: Shawn Lin , FUKAUMI Naoki , Krishna chaitanya chundru , Niklas Cassel , stable@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 4/6] Revert "PCI: qcom: Enable MSI interrupts together with Link up if 'Global IRQ' is supported" Date: Tue, 11 Nov 2025 11:51:04 +0100 Message-ID: <20251111105100.869997-12-cassel@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251111105100.869997-8-cassel@kernel.org> References: <20251111105100.869997-8-cassel@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3878; i=cassel@kernel.org; h=from:subject; bh=dxfl6VKXp5ljUeoqAAoIb/M0SIKNtJ0w3TrOAdaiob0=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGDKFRcXu6ZYrntHv83c8bN5nF7cw2P1nzh+Becfetiase eu0rFi7o5SFQYyLQVZMkcX3h8v+4m73KccV79jAzGFlAhnCwMUpABOZ8pyR4d3CV9HcHZUzH7Ou 1NaewcW5UT9X4KhupcbcAyZ2roElCowMB2uMOr569J4QnzfhRsYGpiCpmwdTXv+pX3rHTJbVTdK IGwA= X-Developer-Key: i=cassel@kernel.org; a=openpgp; fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA Content-Transfer-Encoding: 8bit This reverts commit ba4a2e2317b9faeca9193ed6d3193ddc3cf2aba3. While this fake hotplugging was a nice idea, it has shown that this feature does not handle PCIe switches correctly: pci_bus 0004:43: busn_res: can not insert [bus 43-41] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci_bus 0004:43: busn_res: [bus 43-41] end is updated to 43 pci_bus 0004:43: busn_res: can not insert [bus 43] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci 0004:42:00.0: devices behind bridge are unusable because [bus 43] cannot be assigned for them pci_bus 0004:44: busn_res: can not insert [bus 44-41] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci_bus 0004:44: busn_res: [bus 44-41] end is updated to 44 pci_bus 0004:44: busn_res: can not insert [bus 44] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci 0004:42:02.0: devices behind bridge are unusable because [bus 44] cannot be assigned for them pci_bus 0004:45: busn_res: can not insert [bus 45-41] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci_bus 0004:45: busn_res: [bus 45-41] end is updated to 45 pci_bus 0004:45: busn_res: can not insert [bus 45] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci 0004:42:06.0: devices behind bridge are unusable because [bus 45] cannot be assigned for them pci_bus 0004:46: busn_res: can not insert [bus 46-41] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci_bus 0004:46: busn_res: [bus 46-41] end is updated to 46 pci_bus 0004:46: busn_res: can not insert [bus 46] under [bus 42-41] (conflicts with (null) [bus 42-41]) pci 0004:42:0e.0: devices behind bridge are unusable because [bus 46] cannot be assigned for them pci_bus 0004:42: busn_res: [bus 42-41] end is updated to 46 pci_bus 0004:42: busn_res: can not insert [bus 42-46] under [bus 41] (conflicts with (null) [bus 41]) pci 0004:41:00.0: devices behind bridge are unusable because [bus 42-46] cannot be assigned for them pcieport 0004:40:00.0: bridge has subordinate 41 but max busn 46 During the initial scan, PCI core doesn't see the switch and since the Root Port is not hot plug capable, the secondary bus number gets assigned as the subordinate bus number. This means, the PCI core assumes that only one bus will appear behind the Root Port since the Root Port is not hot plug capable. This works perfectly fine for PCIe endpoints connected to the Root Port, since they don't extend the bus. However, if a PCIe switch is connected, then there is a problem when the downstream busses starts showing up and the PCI core doesn't extend the subordinate bus number after initial scan during boot. The long term plan is to migrate this driver to the pwrctrl framework, once it adds proper support for powering up and enumerating PCIe switches. Cc: stable@vger.kernel.org Suggested-by: Manivannan Sadhasivam Signed-off-by: Niklas Cassel --- drivers/pci/controller/dwc/pcie-qcom.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 70c0ae8b7523..28f5f7acb92a 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -136,7 +136,6 @@ /* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */ #define PARF_INT_ALL_LINK_UP BIT(13) -#define PARF_INT_MSI_DEV_0_7 GENMASK(30, 23) /* PARF_NO_SNOOP_OVERRIDE register fields */ #define WR_NO_SNOOP_OVERRIDE_EN BIT(1) @@ -1951,8 +1950,7 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_host_deinit; } - writel_relaxed(PARF_INT_ALL_LINK_UP | PARF_INT_MSI_DEV_0_7, - pcie->parf + PARF_INT_ALL_MASK); + writel_relaxed(PARF_INT_ALL_LINK_UP, pcie->parf + PARF_INT_ALL_MASK); } qcom_pcie_icc_opp_update(pcie); -- 2.51.1