From patchwork Thu Jun 29 19:14:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13297226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AE41EB64DD for ; Thu, 29 Jun 2023 19:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9XB2Ua2Q9EF7w5Pt2+Ap3nFyMDemtQaSoBAOU48zo+I=; b=lDgqBHMLQ/r/kv fcWfpq+7RVx2T2fsPIY2uEwX6i0tKhfZ+sa1qGkgGpbaF5IrbxoOB/SoX3Qb9PsujDf3pQ4hnsjZN IkLV9tMs2gzdzHSQqCU94O8qDNFdWdljYxVVnf7IB2u26oPyG//6snFHBhuLM0M5ErFZJ1vxtIe91 gDtQxEFLffNTqQnihOMm/PuawXGz/uZqtTqg1awTv9DMHbCx7SyWs1F/vPuaNCCFZz+CTwMw/uBVL sJsz1M/3Xs+d6YWgscu5f/xDz9pLKfBm7zaLwN2Eg6Q/ne2Ks+/+49ibZE0tXRNIfycQRhYLrmLVC XXKTI2pinhgLjhXyLZpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qEx9e-001uYM-0O; Thu, 29 Jun 2023 19:18:10 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qEx9b-001uXJ-0d for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2023 19:18:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688066286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YCceMk07Z77c7iGv0vMNdhiFvW89N91YRXanb/xg6cQ=; b=dbw/GRy/ppvpcrIJA+UvpmnK6mnlb3nyXjJWy7e6uWDAFlLPO/XIM16tbm5SXUYXyFFOmn TBBFNM4TzRt6BKcGc1ChNB/JAIdEvmp+rG2lX8wWDwo3+X2pl6hrSM5bhMRvGq6PYXOExJ KPbx5OtuIfrADZPNfOSvF5hIjLIDYWw= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-19fEQEceO7yus-24j2QqOA-1; Thu, 29 Jun 2023 15:18:04 -0400 X-MC-Unique: 19fEQEceO7yus-24j2QqOA-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-57059f90cc5so8892827b3.0 for ; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688066284; x=1690658284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YCceMk07Z77c7iGv0vMNdhiFvW89N91YRXanb/xg6cQ=; b=DoAZ7SpSkLx1ia+4sDQlpDMNfTq1nCidvGuOxrRUSlw+48mUwgTTUPs/zDbiv6qRRB YE0GeacVFUhRsVbI+4Af2PfqCiahcbFfVYTQESnXmB60dE6jKwYs3gQSRMvFrr+jrfy4 hGC4GnO7VIMFzKyI/jmoPcLyrnyU73MM/N9+PDR04LYagi3KPIGJ/jXlZu374BJHFxzQ 0yHgMNvx2eFHmeoPWclfMlSthSwSoz0M6kaa0yVUVlNRkTUr/1x3BJYi6APWYDzxxWod 7fAUqqrSo/F1ocmbr26LPBMRopT/otTfwRvNjkflRV7wQRWIgwHiEoEigKntatvEEloq 1myg== X-Gm-Message-State: ABy/qLbnKD8W21SVLGnYMK/UDnme0T4wIQHKsOnQtlTLL9nDMkcWYjwN t8fyOBD2uuD7mS6bV/6b3kb0031OVgpKSQnHCFNjM4cwWvdSK9cBXSLD1hynshRcBid4sTpwUcs U0Sc6Zx4iW/z9eK3Z/mnnAYRrzQRaQR824c4= X-Received: by 2002:a81:88c7:0:b0:56d:43bd:5513 with SMTP id y190-20020a8188c7000000b0056d43bd5513mr352220ywf.5.1688066284373; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdHXzFMRozd6nGxf58W0Xv/QopKQ9WchA/okhijXMBtBl5YPN9hN+ACX/VQ9/Q0R3vF2Wxng== X-Received: by 2002:a81:88c7:0:b0:56d:43bd:5513 with SMTP id y190-20020a8188c7000000b0056d43bd5513mr352198ywf.5.1688066284148; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) Received: from halaney-x13s.redhat.com ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id w127-20020a0ded85000000b0057085b18cddsm3052478ywe.54.2023.06.29.12.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 12:18:03 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, mcoquelin.stm32@gmail.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, davem@davemloft.net, joabreu@synopsys.com, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, bhupesh.sharma@linaro.org, vkoul@kernel.org, bartosz.golaszewski@linaro.org, Andrew Halaney Subject: [PATCH 3/3] net: stmmac: dwmac-qcom-ethqos: Log more errors in probe Date: Thu, 29 Jun 2023 14:14:18 -0500 Message-ID: <20230629191725.1434142-3-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629191725.1434142-1-ahalaney@redhat.com> References: <20230629191725.1434142-1-ahalaney@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230629_121807_312205_779799C4 X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These are useful to see when debugging a probe failure. Signed-off-by: Andrew Halaney --- .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index a40869b2dd64..d792b7dd9fc3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -706,7 +706,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ret = stmmac_get_platform_resources(pdev, &stmmac_res); if (ret) - return ret; + return dev_err_probe(dev, ret, + "Failed to get platform resources\n"); plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac); if (IS_ERR(plat_dat)) { @@ -735,13 +736,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->configure_func = ethqos_configure_sgmii; break; default: + dev_err(dev, "Unsupported phy mode %s\n", + phy_modes(ethqos->phy_mode)); return -EINVAL; } ethqos->pdev = pdev; ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); if (IS_ERR(ethqos->rgmii_base)) - return PTR_ERR(ethqos->rgmii_base); + return dev_err_probe(dev, PTR_ERR(ethqos->rgmii_base), + "Failed to map rgmii resource\n"); ethqos->mac_base = stmmac_res.addr; @@ -753,7 +757,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->link_clk = devm_clk_get(dev, data->link_clk_name ?: "rgmii"); if (IS_ERR(ethqos->link_clk)) - return PTR_ERR(ethqos->link_clk); + return dev_err_probe(dev, PTR_ERR(ethqos->link_clk), + "Failed to get link_clk\n"); ret = ethqos_clks_config(ethqos, true); if (ret) @@ -765,7 +770,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); if (IS_ERR(ethqos->serdes_phy)) - return PTR_ERR(ethqos->serdes_phy); + return dev_err_probe(dev, PTR_ERR(ethqos->serdes_phy), + "Failed to get serdes phy\n"); ethqos->speed = SPEED_1000; ethqos_update_link_clk(ethqos, SPEED_1000);