Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3118775pxm; Mon, 28 Feb 2022 12:25:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEGLl/VRPevW+ex0RDy6HQnP7iusHsoTV/hHMfu4P8/6+F3/lBZJxLVrKMxVb3LEQl4Pom X-Received: by 2002:a17:90a:cf87:b0:1bd:3595:3ee4 with SMTP id i7-20020a17090acf8700b001bd35953ee4mr9534469pju.100.1646079904989; Mon, 28 Feb 2022 12:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079904; cv=none; d=google.com; s=arc-20160816; b=R2CUI+rHvLmtrM2vCY3yBmen+spsB08D56S2kS0JrrOUVQX2mkfzdF4A3BVz8twnUA r6rZTEt4WqiPMteAX97RvyFVuGvoIQff6ZNyKJxMggHCCHISTTS8FkSEIv37h2BtrWdm ouTIeO2XfjlCmbfz+4sU9FhgfvZ9ROHQLDz3rSZgIoNDwVXPxAeaeSzsHEzWTQ28h7eT LM8u0JujwtRUSNMPK4s/T7Co4iZf9n12/F0x8mAZ5fvUyU4eUtWkC+84LKFtJNL22jhL KgtpeDhymPNqulVIXY+Amh8JcckNFlslKXlYIYdKjRzq/BVHp6KN6lqc89AL9paZnNXV BvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J/Kuf5XUT4LHpQ12qRtZV1mAKT0nEv1PNxtN2ABdqso=; b=Qo+8bK0jtB6KME+vvb+KqJEp4Xz9Q7eMe7VQfGyUJWbnLUKHWyFEcgBXK4gLhHjWns 2koB7QMdfcf+Ht89MFHP1af5ICDsBvZyY5XajrI0VSfFMpbFJ+lXC6BvsuBGhtLIKs8x 7kE5LkLrL44EjOXQjKR639O+tPqgn/LVjuoAnumYPg1S23mul+e26vvb9r/n/g5ds8Zi 6uisZH+jc1V1kpyJ7vv6bd4PUeODdEmZgu8JLlT9z05rQHo89PqbjkTryaaF51YKcbqg JdAOa3BGHbBVk10r71LobrSsnb2wSbTiewGumy8q5jDlPgP35SoUSeF92pzNej1JfdfC SYMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wcmkxS7i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id fv9-20020a17090b0e8900b001bcaf7e42basi458039pjb.8.2022.02.28.12.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wcmkxS7i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95BAB1DFDD0; Mon, 28 Feb 2022 11:43:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235590AbiB1SHt (ORCPT + 99 others); Mon, 28 Feb 2022 13:07:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240456AbiB1SDf (ORCPT ); Mon, 28 Feb 2022 13:03:35 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6810D75E6E; Mon, 28 Feb 2022 09:47:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46FFE60916; Mon, 28 Feb 2022 17:47:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CAAFC340E7; Mon, 28 Feb 2022 17:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646070434; bh=pTjuL6BPXjGQj8a+GNkF6+8a01Bmr4IZIrwdI89SEF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wcmkxS7iszO2ARQCQebqke9HQzFDfV+ppc2Jomi8HgebI1UPlEEpMSBvDCkEPpLi2 tE0hEI8TXHATtlgHXu/nKweLiZNEKoZF75WMfRBrFch8Ei8D4+S5eZr04BNGE20xo9 PXXqhJPlB5s3arAUJNgzCfhD1clt5/cts5BYK4No= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Palus , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.16 100/164] PCI: mvebu: Fix device enumeration regression Date: Mon, 28 Feb 2022 18:24:22 +0100 Message-Id: <20220228172408.862588812@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172359.567256961@linuxfoundation.org> References: <20220228172359.567256961@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Pali Rohár [ Upstream commit c49ae619905eebd3f54598a84e4cd2bd58ba8fe9 ] Jan reported that on Turris Omnia (Armada 385), no PCIe devices were detected after upgrading from v5.16.1 to v5.16.3 and identified the cause as the backport of 91a8d79fc797 ("PCI: mvebu: Fix configuring secondary bus of PCIe Root Port via emulated bridge"), which appeared in v5.17-rc1. 91a8d79fc797 was incorrectly applied from mailing list patch [1] to the linux git repository [2] probably due to resolving merge conflicts incorrectly. Fix it now. [1] https://lore.kernel.org/r/20211125124605.25915-12-pali@kernel.org [2] https://git.kernel.org/linus/91a8d79fc797 [bhelgaas: commit log] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215540 Fixes: 91a8d79fc797 ("PCI: mvebu: Fix configuring secondary bus of PCIe Root Port via emulated bridge") Link: https://lore.kernel.org/r/20220214110228.25825-1-pali@kernel.org Link: https://lore.kernel.org/r/20220127234917.GA150851@bhelgaas Reported-by: Jan Palus Signed-off-by: Pali Rohár Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/controller/pci-mvebu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index 357e9a293edf7..2a3bf82aa4e26 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -1288,7 +1288,8 @@ static int mvebu_pcie_probe(struct platform_device *pdev) * indirectly via kernel emulated PCI bridge driver. */ mvebu_pcie_setup_hw(port); - mvebu_pcie_set_local_dev_nr(port, 0); + mvebu_pcie_set_local_dev_nr(port, 1); + mvebu_pcie_set_local_bus_nr(port, 0); } pcie->nports = i; -- 2.34.1