[PATCH] PCI: imx6: Use dev_err_probe() when parsing Root Port nodes

Frank Li Frank.li at oss.nxp.com
Mon Nov 23 08:08:29 PST 2026


On Mon, Nov 23, 2026 at 02:41:10PM +0200, Stefan Ghetu wrote:
> 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.
>
> Signed-off-by: Stefan Ghetu <stefan.ghetu at nxp.com>
> ---

Reviewed-by: Frank Li <Frank.Li at nxp.com>

>  drivers/pci/controller/dwc/pci-imx6.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 865438ffde879..2a7f09630d14c 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -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
>
>



More information about the linux-arm-kernel mailing list