From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CF67C43334 for ; Fri, 1 Jul 2022 20:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=guRtQE+cDeWSKLW2thj4XvbGLZdBYFyMhkkTr6fqyEw=; b=nsTRykRf/jWNqQ hKfrVFz0gs3YBIVr0SiQhWj3wwlNXlPyFTQglJBLoDuKNy941gsPrdk34tWq0BtCxSzP1Q1xMiUcE DAyMWil8G5IQu4rcYm6OdXElcdP2hxVsHObDWVOudK1N6gGEsKOLCplt2cLLIvGw9vNH47C3kmBDZ V02yZeh9ZwaGt2LqwQgxRU0eWpwcBXBxJBw3L1plFjcgSgb292A8tWwdxzzwL3DkuUCz56TkeUPxx f9ykq+8fxw1rg7Eq3dbnCCct/1A8C7p3Sgw1qByQMKVej/FiuH5l2pRtDC1qphE7qE6qh7HjoRpfQ 8rxN8k5VmtlOHF5H4EsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7NjA-006uHU-HO; Fri, 01 Jul 2022 20:59:00 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7Nj7-006uEy-9f; Fri, 01 Jul 2022 20:58:58 +0000 Received: by mail-qk1-x735.google.com with SMTP id g1so2680772qkl.9; Fri, 01 Jul 2022 13:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=qjEIvhF5OlXSbXMbrdjH4oBXqjY7AyocItVAB4DWZ+g=; b=MLi1DwcFJ14LFBhvXTvuddrcClEKaODysYl/pU/hhXANX/v+cJmboUXA7iQMr64BoV rZxMl30TrgBpJZMuQKkmD2YOE3pyzZMSx35gaIB0+LrENO2bP7Uxfi8jL8w5oU+wr//h bZUTUHrfBkhRvVygGSyyX4IzWJz7TJpo7J+OxpMIkdH3Lq2ISDhR+0wdmNCOtbcBMB4D Wwp6oAslSj63wIhoXrdnnLzf0WMUWlWNgdUggJJ2dJ3zKvT9u1i0A/Bvp+x2brQ9kyoM cEJe3/TKcGAel0K3M4L26lPw6iMB4f8rKAX/7hjX4rs5cMsyqWJZHn4WF6wvRKRUPSHj czDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=qjEIvhF5OlXSbXMbrdjH4oBXqjY7AyocItVAB4DWZ+g=; b=XmUpiropaZUzIekq3/bwQ8Q8Y5V5/vLrppP8K3tky830wV4o6NuppPL09f/qfmJcY6 IVHfp7eutLJeN0pGpM9y5CJH/BjZyiU8Fxzu5ptcuR+2IRBxQS+h6IrcIoUyEFK3dwkv pSp92KM++7XYKDEINDKrJ63mND41+EA4A07sg4dApJEk1M9eronRgc7op2f2VmYy3thm cg3LsCZUEiHJHEiSIybWdGUzw5HllhU8jQGDjZ1Vl2CC7mdihqUoMrLF00HQFrk1LenL 2uTfYlYe9labiGjD/BP2XeEUmpP3MCX3gwO+wrWMZLYJJ6Zn2ZJldXTjxSNT2KUfvvjA 1vPw== X-Gm-Message-State: AJIora/FeUgydZTiunpVMAySVV1BVm6Le8ZITDKJEFxux7nD84fAlO2S nLJVGTk76rrdTybLgPXokGg= X-Google-Smtp-Source: AGRyM1tJd4PvpQ1x+MXRqgK6imhG1nM0mQQOAFtcueeW/mKH/Nk8DXjKTZ5n/YYG4ygrQP2hz1aH8w== X-Received: by 2002:a37:48b:0:b0:6af:2c49:1598 with SMTP id 133-20020a37048b000000b006af2c491598mr11927612qke.121.1656709134767; Fri, 01 Jul 2022 13:58:54 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id o4-20020ac87c44000000b003164efd0a5fsm3650966qtv.41.2022.07.01.13.58.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 13:58:54 -0700 (PDT) Message-ID: <1a50e8b0-1453-4561-bc3d-c428bb65288a@gmail.com> Date: Fri, 1 Jul 2022 13:58:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v1 0/4] PCI: brcmstb: Re-submit reverted patchset Content-Language: en-US To: Jim Quinlan , linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Cc: =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Rob Herring References: <20220701162726.31346-1-jim2101024@gmail.com> From: Florian Fainelli In-Reply-To: <20220701162726.31346-1-jim2101024@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220701_135857_404665_952E5F36 X-CRM114-Status: GOOD ( 22.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/1/22 09:27, Jim Quinlan wrote: > A submission [1] was made to enable a PCIe root port to turn on regulators > for downstream devices. It was accepted. Months later, a regression was > discovered on an RPi CM4 [2]. The patchset was reverted [3] as the fix > came too late in the release cycle. The regression in question is > triggered only when the PCIe RC DT node has no root port subnode, which is > a perfectly reasonsable configuration. > > The original commits are now being resubmitted with some modifications to > fix the regression. The modifcations on the original commits are > described below (the SHA is that of the original commit): > > [830aa6f29f07 PCI: brcmstb: Split brcm_pcie_setup() into two funcs] > NOTE: In the originally submitted patchset, this commit introduced a > regression that was corrected by a subsequent commit in the same > patchset. Let's not do this again. > > @@ -1411,6 +1411,10 @@ static int brcm_pcie_probe(struct platform_device *pdev) > if (ret) > goto fail; > > + ret = brcm_pcie_linkup(pcie); > + if (ret) > + goto fail; > > > [67211aadcb4b PCI: brcmstb: Add mechanism to turn on subdev regulators] > NOTE: Not related to the regression, the regulators must be freed whenever > the PCIe tree is dismantled: > > @@ -507,6 +507,7 @@ static void pci_subdev_regulators_remove_bus(struct pci_bus *bus) > > if (regulator_bulk_disable(sr->num_supplies, sr->supplies)) > dev_err(dev, "failed to disable regulators for downstream device\n"); > + regulator_bulk_free(sr->num_supplies, sr->supplies); > dev->driver_data = NULL; > > > [93e41f3fca3d PCI: brcmstb: Add control of subdevice voltage regulators] > NOTE: If the PCIe RC DT node was missing a Root Port subnode, the PCIe > link-up was skipped. This is the regression. Fix it by attempting > link-up even if the Root Port DT subnode is missing. > > @@ -503,11 +503,10 @@ static int pci_subdev_regulators_add_bus(struct pci_bus *bus) > > static int brcm_pcie_add_bus(struct pci_bus *bus) > { > - struct device *dev = &bus->dev; > struct brcm_pcie *pcie = (struct brcm_pcie *) bus->sysdata; > int ret; > > - if (!dev->of_node || !bus->parent || !pci_is_root_bus(bus->parent)) > + if (!bus->parent || !pci_is_root_bus(bus->parent)) > return 0; > > ret = pci_subdev_regulators_add_bus(bus); > > [1] https://lore.kernel.org/r/20220106160332.2143-1-jim2101024@gmail.com > [2] https://bugzilla.kernel.org/show_bug.cgi?id=215925 > [3] https://lore.kernel.org/linux-pci/20220511201856.808690-1-helgaas@kernel.org/ On a Raspberry Pi 4B: Tested-by: Florian Fainelli -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel