[{"id":3673489,"web_url":"http://patchwork.ozlabs.org/comment/3673489/","msgid":"<e7ligkrj2jtak6rqivayvhryhovbjeozbinmu2g43k4b2nz34i@npmvltf7agkq>","list_archive_url":null,"date":"2026-04-04T17:17:17","subject":"Re: [PATCH v2] PCI: rzg3s-host: Treat link-down as -ENODEV instead\n of error","submitter":{"id":78905,"url":"http://patchwork.ozlabs.org/api/people/78905/","name":"Manivannan Sadhasivam","email":"mani@kernel.org"},"content":"On Thu, Apr 02, 2026 at 08:23:53PM +0200, John Madieu wrote:\n> rzg3s_pcie_host_init() failing to establish a PCIe link does not\n> necessarily indicate a hardware or driver error; it may simply mean no\n> card is inserted. Demote the message from dev_err_probe() to dev_info()\n> and return -ENODEV so the driver defers gracefully rather than printing\n> a spurious error.\n> \n> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>\n> ---\n> \n> Changes in v2:\n>  - Dropped Rb tag from Geert as patch structure changed\n>  - Moved link-down handling into rzg3s_pcie_host_init() instead of\n>    masking all errors in rzg3s_pcie_host_setup() (Claudiu)\n>  - Kept dev_err_probe() for real init failures, only suppress for\n>    -ENODEV (link down)\n> \n> v1:\n>   - https://lore.kernel.org/all/20260401143347.8463-1-john.madieu.xa@bp.renesas.com/\n> \n>  drivers/pci/controller/pcie-rzg3s-host.c | 9 +++++++--\n>  1 file changed, 7 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/controller/pcie-rzg3s-host.c\n> index d86e7516dcc2..0acc21981ee9 100644\n> --- a/drivers/pci/controller/pcie-rzg3s-host.c\n> +++ b/drivers/pci/controller/pcie-rzg3s-host.c\n> @@ -1384,8 +1384,11 @@ static int rzg3s_pcie_host_init(struct rzg3s_pcie_host *host)\n>  \t\t\t\t PCIE_LINK_WAIT_SLEEP_MS * MILLI,\n>  \t\t\t\t PCIE_LINK_WAIT_SLEEP_MS * MILLI *\n>  \t\t\t\t PCIE_LINK_WAIT_MAX_RETRIES);\n> -\tif (ret)\n> +\tif (ret) {\n> +\t\tdev_info(host->dev, \"PCIe link down!\\n\");\n> +\t\tret = -ENODEV;\n>  \t\tgoto config_deinit_post;\n> +\t}\n>  \n>  \tval = readl_relaxed(host->axi + RZG3S_PCI_PCSTAT2);\n>  \tdev_info(host->dev, \"PCIe link status [0x%x]\\n\", val);\n> @@ -1655,7 +1658,9 @@ rzg3s_pcie_host_setup(struct rzg3s_pcie_host *host,\n>  \n>  \tret = rzg3s_pcie_host_init(host);\n>  \tif (ret) {\n> -\t\tdev_err_probe(dev, ret, \"Failed to initialize the HW!\\n\");\n> +\t\tif (ret != -ENODEV)\n> +\t\t\tdev_err_probe(dev, ret, \"Failed to initialize the HW!\\n\");\n\nWell, probe() should not fail in the case of LDn unless the controller doesn't\nsupport hotplug.\n\n- Mani","headers":{"Return-Path":"\n <linux-pci+bounces-51895-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=TJ4WCcNq;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51895-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"TJ4WCcNq\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fp2Mx4QKlz1yG2\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 03:17:33 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 02DE2300B9E3\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 17:17:29 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 329CB23C8AE;\n\tSat,  4 Apr 2026 17:17:29 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F2B313E02A;\n\tSat,  4 Apr 2026 17:17:29 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id D858FC19421;\n\tSat,  4 Apr 2026 17:17:25 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775323049; cv=none;\n b=u9SW7+3C4smB33ZwdPC7+4iCtY3zuKKJ0DySmdrEcatOksB64wfdFNaPVgg1mTZME6/u1N6VhJ5sbxYRNSHSlAidVWkSjUmTPa6svAXBmdHOpIM94Pmw0wheAVLm5Z14AeO5bsXNgvQG7quG0OVYSbatrzEerhT19nIL5J3ebkc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775323049; c=relaxed/simple;\n\tbh=da1o/c7ma2TlBTpWGEu3dVWxcf6TfZVrfN83A7BX1uU=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=qE9nDakYJV/A43NUFwbJYW64U552os38Umg1swIA91/pWaZWWnhNnKoz3YbgWwhhZDjPCjQpNduffFbfxS/Nfv5w8bY2mTiKMHREfxbVkh48lz2FnTzM4lDp7yGXkeeZuLilRZx4tTtANZISVwfUXaa3wcp68Ez01uIjH+MCH6k=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=TJ4WCcNq; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775323048;\n\tbh=da1o/c7ma2TlBTpWGEu3dVWxcf6TfZVrfN83A7BX1uU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=TJ4WCcNqWifc0dOa/DeiVnX47sVhr7gCFPdaEQLs0oDM+uarbvpqPHbo9lCQE3xR1\n\t uT3s60c+Rq6993F1Z60Y+DAFKVky2pEcZi6wC9xQKbTlpsrXrJeFBt8+Ti3jokFB2w\n\t 5ohA1vRgoG3krc529qFJeCrEnR+H24G0jeg9OJ9qzQxV07tKCE/XSmgfRtGzCA9dvd\n\t 0uhGFSyqoI2nVBap/IxUpRK7oUNxuYEqd2Hb6CIi6yq2V+3VMYCPdcQ5EDCKa1NF33\n\t kJC8d4/BlA7ic232+n6hVrjyVDBLte3F/umpIFfac30imgjHehylnCtsiJEU54rkDo\n\t 39VSuqViwOzmA==","Date":"Sat, 4 Apr 2026 22:47:17 +0530","From":"Manivannan Sadhasivam <mani@kernel.org>","To":"John Madieu <john.madieu.xa@bp.renesas.com>","Cc":"claudiu.beznea.uj@bp.renesas.com, lpieralisi@kernel.org,\n\tkwilczynski@kernel.org, robh@kernel.org, john.madieu@gmail.com,\n bhelgaas@google.com,\n\tlinux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,\n linux-kernel@vger.kernel.org","Subject":"Re: [PATCH v2] PCI: rzg3s-host: Treat link-down as -ENODEV instead\n of error","Message-ID":"<e7ligkrj2jtak6rqivayvhryhovbjeozbinmu2g43k4b2nz34i@npmvltf7agkq>","References":"<20260402182354.12515-1-john.madieu.xa@bp.renesas.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260402182354.12515-1-john.madieu.xa@bp.renesas.com>"}}]