From: Jim Quinlan <jim2101024@gmail.com>
To: linux-pci@vger.kernel.org,
Nicolas Saenz Julienne <nsaenz@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Cyril Brulebois <kibi@debian.org>,
bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com,
james.quinlan@broadcom.com
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE),
linux-kernel@vger.kernel.org (open list),
linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE),
"Rob Herring" <robh@kernel.org>
Subject: [PATCH v1 0/4] PCI: brcmstb: Re-submit reverted patchset
Date: Fri, 1 Jul 2022 12:27:21 -0400 [thread overview]
Message-ID: <20220701162726.31346-1-jim2101024@gmail.com> (raw)
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/
Jim Quinlan (4):
PCI: brcmstb: Split brcm_pcie_setup() into two funcs
PCI: brcmstb: Add mechanism to turn on subdev regulators
PCI: brcmstb: oAdd control of subdevice voltage regulators
PCI: brcmstb: Do not turn off WOL regulators on suspend
drivers/pci/controller/pcie-brcmstb.c | 257 +++++++++++++++++++++++---
1 file changed, 227 insertions(+), 30 deletions(-)
base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-07-01 16:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 16:27 Jim Quinlan [this message]
2022-07-01 16:27 ` [PATCH v1 1/4] PCI: brcmstb: Split brcm_pcie_setup() into two funcs Jim Quinlan
2022-07-06 21:56 ` Bjorn Helgaas
2022-07-08 13:29 ` Jim Quinlan
2022-07-08 19:04 ` Bjorn Helgaas
2022-07-08 19:40 ` Jim Quinlan
2022-07-08 19:59 ` Bjorn Helgaas
2022-07-08 20:38 ` Jim Quinlan
2022-07-08 22:27 ` Bjorn Helgaas
2022-07-01 16:27 ` [PATCH v1 2/4] PCI: brcmstb: Add mechanism to turn on subdev regulators Jim Quinlan
2022-07-06 23:12 ` Bjorn Helgaas
2022-07-08 14:14 ` Jim Quinlan
2022-07-08 19:07 ` Bjorn Helgaas
2022-07-01 16:27 ` [PATCH v1 3/4] PCI: brcmstb: Add control of subdevice voltage regulators Jim Quinlan
2022-07-06 23:13 ` Bjorn Helgaas
2022-07-08 15:16 ` Jim Quinlan
2022-07-08 19:09 ` Bjorn Helgaas
2022-07-01 16:27 ` [PATCH v1 4/4] PCI: brcmstb: Do not turn off WOL regulators on suspend Jim Quinlan
2022-07-01 20:58 ` [PATCH v1 0/4] PCI: brcmstb: Re-submit reverted patchset Florian Fainelli
2022-07-05 20:55 ` Cyril Brulebois
2022-07-05 21:00 ` Florian Fainelli
2022-07-05 21:28 ` Cyril Brulebois
2022-07-05 22:06 ` Jim Quinlan
2022-07-15 18:27 ` Bjorn Helgaas
2022-07-15 18:30 ` Jim Quinlan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220701162726.31346-1-jim2101024@gmail.com \
--to=jim2101024@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=james.quinlan@broadcom.com \
--cc=kibi@debian.org \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=nsaenz@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).