From nobody Sun Jun 14 06:55:11 2026 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C230A248896; Thu, 2 Apr 2026 18:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154787; cv=none; b=HQA73tZVeTCEwMhc5ND0OFIi9TVU52c+0dE906IDIV/xv+sxsCbOZ4fm/5vQDlMX/ITFZaUUW0kBP9E5OGykDkd/vWm6GZMirWrS/pDGoqJMbF0sT0vtMV8M/mMTTym0DI4s6iWf6u+e7s5NZO/rdtt/q6Q8Iu+4Wo3TecS87RQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154787; c=relaxed/simple; bh=+h1S6IY/LtS6nxa6y8su80IJrFMDgvebuxUTacdGUDM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YuihQxFf4g1MXEwPqSyD8xGYzwW2usTzYTgLGrFMixAHwvOvvwvLdTltHcVMyg4mTk8jEV2OckfIewdixh1OT1hA3cUSrHzEkNDzH2zIsNQ2hr1ihgQK05GroCc+YU9DhlQaUjhBRhPetyva8QVcNApk7U2/5P3Vduh/8qtI3+Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: jFfU/CcpTiu7OpgY2IVAaQ== X-CSE-MsgGUID: yDG8MbmLSH+gGNnoJiOQLA== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 03 Apr 2026 03:33:04 +0900 Received: from ubuntu.adwin.renesas.com (unknown [10.226.92.32]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 19AB7400068F; Fri, 3 Apr 2026 03:33:00 +0900 (JST) From: John Madieu To: claudiu.beznea.uj@bp.renesas.com, lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org Cc: robh@kernel.org, john.madieu@gmail.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, John Madieu Subject: [PATCH v2] PCI: rzg3s-host: Treat link-down as -ENODEV instead of error Date: Thu, 2 Apr 2026 20:23:53 +0200 Message-ID: <20260402182354.12515-1-john.madieu.xa@bp.renesas.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" rzg3s_pcie_host_init() failing to establish a PCIe link does not necessarily indicate a hardware or driver error; it may simply mean no card is inserted. Demote the message from dev_err_probe() to dev_info() and return -ENODEV so the driver defers gracefully rather than printing a spurious error. Signed-off-by: John Madieu --- Changes in v2: - Dropped Rb tag from Geert as patch structure changed - Moved link-down handling into rzg3s_pcie_host_init() instead of masking all errors in rzg3s_pcie_host_setup() (Claudiu) - Kept dev_err_probe() for real init failures, only suppress for -ENODEV (link down) v1: - https://lore.kernel.org/all/20260401143347.8463-1-john.madieu.xa@bp.ren= esas.com/ drivers/pci/controller/pcie-rzg3s-host.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/control= ler/pcie-rzg3s-host.c index d86e7516dcc2..0acc21981ee9 100644 --- a/drivers/pci/controller/pcie-rzg3s-host.c +++ b/drivers/pci/controller/pcie-rzg3s-host.c @@ -1384,8 +1384,11 @@ static int rzg3s_pcie_host_init(struct rzg3s_pcie_ho= st *host) PCIE_LINK_WAIT_SLEEP_MS * MILLI, PCIE_LINK_WAIT_SLEEP_MS * MILLI * PCIE_LINK_WAIT_MAX_RETRIES); - if (ret) + if (ret) { + dev_info(host->dev, "PCIe link down!\n"); + ret =3D -ENODEV; goto config_deinit_post; + } =20 val =3D readl_relaxed(host->axi + RZG3S_PCI_PCSTAT2); dev_info(host->dev, "PCIe link status [0x%x]\n", val); @@ -1655,7 +1658,9 @@ rzg3s_pcie_host_setup(struct rzg3s_pcie_host *host, =20 ret =3D rzg3s_pcie_host_init(host); if (ret) { - dev_err_probe(dev, ret, "Failed to initialize the HW!\n"); + if (ret !=3D -ENODEV) + dev_err_probe(dev, ret, "Failed to initialize the HW!\n"); + goto teardown_irqdomain; } =20 --=20 2.25.1