From: Ryan Matthews <ryanmatthews@fastmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
stable@vger.kernel.org, linux-pci@vger.kernel.org,
"Ryan Matthews" <ryanmatthews@fastmail.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Frank Li" <Frank.Li@nxp.com>
Subject: [PATCH 6.1 1/1] PCI: imx6: Skip controller_id generation logic for i.MX7D
Date: Tue, 6 May 2025 01:42:56 -0400 [thread overview]
Message-ID: <20250506054256.4933-2-ryanmatthews@fastmail.com> (raw)
In-Reply-To: <20250506054256.4933-1-ryanmatthews@fastmail.com>
From: Richard Zhu <hongxing.zhu@nxp.com>
[ Upstream commit f068ffdd034c93f0c768acdc87d4d2d7023c1379 ]
The i.MX7D only has one PCIe controller, so controller_id should always be
0. The previous code is incorrect although yielding the correct result.
Fix by removing "IMX7D" from the switch case branch.
Fixes: 2d8ed461dbc9 ("PCI: imx6: Add support for i.MX8MQ")
Link: https://lore.kernel.org/r/20241126075702.4099164-5-hongxing.zhu@nxp.com
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
[Because this switch case does more than just controller_id
logic, move the "IMX7D" case label instead of removing it entirely.]
Signed-off-by: Ryan Matthews <ryanmatthews@fastmail.com>
---
drivers/pci/controller/dwc/pci-imx6.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index a3acf144a40d..4f20094faee5 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1172,11 +1172,10 @@ static int imx6_pcie_probe(struct platform_device *pdev)
if (IS_ERR(imx6_pcie->pcie_aux))
return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
"pcie_aux clock source missing or invalid\n");
- fallthrough;
- case IMX7D:
if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
imx6_pcie->controller_id = 1;
-
+ fallthrough;
+ case IMX7D:
imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
"pciephy");
if (IS_ERR(imx6_pcie->pciephy_reset)) {
--
2.47.2
next prev parent reply other threads:[~2025-05-06 5:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-04 19:13 [PATCH 6.6 0/2] PCI: imx6: Fix i.MX7D controller_id backport regression Ryan Matthews
2025-05-04 19:13 ` [PATCH 6.6 1/2] Revert "PCI: imx6: Skip controller_id generation logic for i.MX7D" Ryan Matthews
2025-05-05 15:13 ` Sasha Levin
2025-05-04 19:13 ` [PATCH 6.6 2/2] PCI: imx6: Skip controller_id generation logic for i.MX7D Ryan Matthews
2025-05-05 15:13 ` Sasha Levin
2025-05-05 9:23 ` [PATCH 6.6 0/2] PCI: imx6: Fix i.MX7D controller_id backport regression Greg Kroah-Hartman
2025-05-06 5:42 ` [PATCH 6.1 0/1] " Ryan Matthews
2025-05-06 5:42 ` Ryan Matthews [this message]
2025-05-06 5:44 ` [PATCH 5.4 " Ryan Matthews
2025-05-06 5:44 ` [PATCH 5.4 1/1] PCI: imx6: Skip controller_id generation logic for i.MX7D Ryan Matthews
2025-05-08 16:18 ` Sasha Levin
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=20250506054256.4933-2-ryanmatthews@fastmail.com \
--to=ryanmatthews@fastmail.com \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hongxing.zhu@nxp.com \
--cc=kwilczynski@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=stable@vger.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