PCI: imx6: Use dev_err_probe() when parsing Root Port nodes
Subsystems (4)
PATCH 1/1 PCI: imx6: Use dev_err_probe() when parsing Root Port nodes
pci_host_common_parse_ports() returns -EPROBE_DEFER when the PERST# GPIO of a Root Port node is provided by a GPIO controller that has not probed yet, e.g. an I2C GPIO expander. imx_pcie_host_init() logs this at error level on every probe attempt:
imx6q-pcie 4c300000.pcie: Failed to parse Root Port nodes: -517
Probe deferral is expected and not an error, but these messages flood the kernel log during boot on boards like the i.MX95 19x19 EVK.
Use dev_err_probe() so that deferral is only recorded as the deferred probe reason, while other errors are still reported.
--- drivers/pci/controller/dwc/pci-imx6.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pci/controller/dwc/pci-imx6.c +3 -4
@@ -1395,10 +1395,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)if (bridge &&list_empty (&bridge->ports)) {/* Parse Root Port nodes if present */ ret =pci_host_common_parse_ports (dev, bridge); -if (ret) { -dev_err (dev,"Failed to parse Root Port nodes: %d\n" , ret); -return ret; - } +if (ret) +return dev_err_probe (dev, ret, +"Failed to parse Root Port nodes\n" );/* Fall back to legacy binding for DT backwards compatibility */ if (!imx_pcie_perst_found (bridge)) {
base-commit: 7bf2db752515a9020b310984ae3bce1089cfdf20
Signature · 1 line
2.53.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 7 lines
pci_host_common_parse_ports()returns -EPROBE_DEFER when the PERST# GPIO of a Root Port node is provided by a GPIO controller that has not probed yet, e.g. an I2C GPIO expander.imx_pcie_host_init()logs this at error level on every probe attempt:imx6q-pcie 4c300000.pcie: Failed to parse Root Port nodes: -517
Quoted 7 lines
Probe deferral is expected and not an error, but these messages flood the kernel log during boot on boards like the i.MX95 19x19 EVK.
Use
dev_err_probe()so that deferral is only recorded as the deferred probe reason, while other errors are still reported.Signed-off-by Stefan Ghetu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 7 lines · Stefan Ghetu
pci_host_common_parse_ports()returns -EPROBE_DEFER when the PERST# GPIO of a Root Port node is provided by a GPIO controller that has not probed yet, e.g. an I2C GPIO expander.imx_pcie_host_init()logs this at error level on every probe attempt:imx6q-pcie 4c300000.pcie: Failed to parse Root Port nodes: -517
Quoted 8 lines
Probe deferral is expected and not an error, but these messages flood the kernel log during boot on boards like the i.MX95 19x19 EVK.
Use
dev_err_probe()so that deferral is only recorded as the deferred probe reason, while other errors are still reported.Signed-off-by Stefan Ghetu <[email protected]>---
Quoted 27 lines
drivers/pci/controller/dwc/pci-imx6.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/pci/controller/dwc/pci-imx6.c +3
-4@@ -1395,10 +1395,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)if (bridge &&list_empty (&bridge->ports)) {/* Parse Root Port nodes if present */ ret =pci_host_common_parse_ports (dev, bridge); -if (ret) { -dev_err (dev,"Failed to parse Root Port nodes: %d\n" , ret); -return ret; - } +if (ret) +return dev_err_probe (dev, ret, +"Failed to parse Root Port nodes\n" );/* Fall back to legacy binding for DT backwards compatibility */ if (!imx_pcie_perst_found (bridge)) {base-commit:
7bf2db752515a9020b310984ae3bce1089cfdf20--
2.53.0