From patchwork Mon Jul 10 20:06:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13307572 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE10C14AB0 for ; Mon, 10 Jul 2023 20:17:38 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 732A113E for ; Mon, 10 Jul 2023 13:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689020256; 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=YmlAnwDpnt7QnZH9R1+eVRqHntPGLtyJNksmlK12GAU=; b=EOkQN6twhZrgUcYmbPrfnWduq5z+Beqp4QwpmPbVKca1sFR4o28fzHL8eHxF3lo2/wWoK+ Yr5bkI4ILbZg0t8YecAngOG5aphu/vvbZfDk0AVYcn3ozYeSLIDNEHb4sZUzYBhVcI6Cud O7A+BHxx7H4rlgWAxaE0CA7Wvq2xU4o= Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-noJKcT9tM_WjzMKiGZbhww-1; Mon, 10 Jul 2023 16:17:35 -0400 X-MC-Unique: noJKcT9tM_WjzMKiGZbhww-1 Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-5635b23aa0cso3200388eaf.0 for ; Mon, 10 Jul 2023 13:17:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689020254; x=1691612254; 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=YmlAnwDpnt7QnZH9R1+eVRqHntPGLtyJNksmlK12GAU=; b=OkBzG8YC5UM1KB2u8EFi+SYCT9mp5TESVlKfrW0QdBe2VFLU/v7x6eC2aezEZ+nsnI nAqYLtSQNDtm9IvnNelZEckKHC29PiP68N/cTHx1a0qopKBEjj0hHeqUjoyYSSDAH7tx yZvSMXb39AmPyF7FxkVthz/yRnrL3qtHKlhFsOige4aSE+Bv92nDAOe7FsksDwTfrFo0 z3iqqcSiB4HUIvgVDWOu0tgzqErLFykLUZoHyptunRM7lGiq75s+eQQ9dJU3JwC+p1Yh rthgDTqpKgeEW5POgshPwcDH/ZnBH5X+aqpGksMgvYjRhWavs0c6+g+dGRjx9u15nwiP 0wJQ== X-Gm-Message-State: ABy/qLY5RBhS9MntxPyZCIJTkMIy7dAnokRfGMqRFpkS9ni56PcpMCjc rxkxDg2DsEIKuN4bOmh/OB1sg0DwX4tTnanPjlqTeiXrEKlchfoTBdsBRM3x4OTsiGhB3F5qAKJ IJfLBBCHa2AHVsiry X-Received: by 2002:a05:6870:5254:b0:1b0:4fc5:2e4b with SMTP id o20-20020a056870525400b001b04fc52e4bmr13438904oai.9.1689020254688; Mon, 10 Jul 2023 13:17:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmKqPEtPtyW1H2DGn/G9uxqGi6UQiom7uSU/SpIgU9Y6/TP9FG19pTfynkVg73dr92H4bGyw== X-Received: by 2002:a05:6870:5254:b0:1b0:4fc5:2e4b with SMTP id o20-20020a056870525400b001b04fc52e4bmr13438882oai.9.1689020254461; Mon, 10 Jul 2023 13:17:34 -0700 (PDT) Received: from halaney-x13s.attlocal.net ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id j12-20020a81920c000000b0056d2a19ad91sm155097ywg.103.2023.07.10.13.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 13:17:34 -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, linux-arm-msm@vger.kernel.org, andrew@lunn.ch, simon.horman@corigine.com, Andrew Halaney Subject: [PATCH net-next v2 1/3] net: stmmac: dwmac-qcom-ethqos: Use of_get_phy_mode() over device_get_phy_mode() Date: Mon, 10 Jul 2023 15:06:37 -0500 Message-ID: <20230710201636.200412-2-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230710201636.200412-1-ahalaney@redhat.com> References: <20230710201636.200412-1-ahalaney@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Since this driver only uses devicetree, let's move over to of_get_phy_mode(). That API has an explicit error return and produces a phy_interface_t directly instead of an int when representing the phy mode. Signed-off-by: Andrew Halaney Reviewed-by: Andrew Lunn --- Changes since v1: * Convert to using of_get_phy_mode() instead of continuing to use device_get_phy_mode() (Andrew Lunn) .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index e62940414e54..ebafdadb28d5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -4,10 +4,10 @@ #include #include #include +#include #include #include #include -#include #include "stmmac.h" #include "stmmac_platform.h" @@ -104,7 +104,7 @@ struct qcom_ethqos { struct clk *link_clk; struct phy *serdes_phy; unsigned int speed; - int phy_mode; + phy_interface_t phy_mode; const struct ethqos_emac_por *por; unsigned int num_por; @@ -720,7 +720,9 @@ static int qcom_ethqos_probe(struct platform_device *pdev) if (!ethqos) return -ENOMEM; - ethqos->phy_mode = device_get_phy_mode(dev); + ret = of_get_phy_mode(np, ðqos->phy_mode); + if (ret) + return dev_err_probe(dev, ret, "Failed to get phy mode\n"); switch (ethqos->phy_mode) { case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: @@ -731,8 +733,6 @@ static int qcom_ethqos_probe(struct platform_device *pdev) case PHY_INTERFACE_MODE_SGMII: ethqos->configure_func = ethqos_configure_sgmii; break; - case -ENODEV: - return -ENODEV; default: return -EINVAL; } From patchwork Mon Jul 10 20:06:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13307573 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD82E156D5 for ; Mon, 10 Jul 2023 20:17:41 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D54C13E for ; Mon, 10 Jul 2023 13:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689020259; 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=ZfBCs08BCyvb4rUBf/lFUidTAq5uH0UA99R+iDtQ+Ug=; b=Pnya4dSf4foCvV4aRMLFzaJuoB8VBuNFZ9GeishVdwZBhinU4P8rvcFgfeJtugbP0vUBcJ /E+N6OTfatjTs3kKboUX2OmR+AwB5QMHWJIi/7xmRi2zWOKecQyXHn5ioTbUs7V7HvQL6j RAYVjNpNiRycYE/F2SaJKHLygEeSsBY= Received: from mail-oa1-f69.google.com (mail-oa1-f69.google.com [209.85.160.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-FH-OcR57NXu079Z5myds6g-1; Mon, 10 Jul 2023 16:17:38 -0400 X-MC-Unique: FH-OcR57NXu079Z5myds6g-1 Received: by mail-oa1-f69.google.com with SMTP id 586e51a60fabf-1b443821eefso3301463fac.3 for ; Mon, 10 Jul 2023 13:17:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689020258; x=1691612258; 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=ZfBCs08BCyvb4rUBf/lFUidTAq5uH0UA99R+iDtQ+Ug=; b=ejSvk1RqWC6wtaxLtzw+6RM+uEYD295wA2YZ+we9V5MeMPtgW7Naccp+QeMjqpgrgA 5N2wFK23KVwQtMyEcZHPpLUqpkWLCc9kQKoOXWFEt/sk2zuN+tBfNiJIN/9IvewPsyoV 3X62BDgxSCl38d0TQiwVJS4G94XiCap5aybGUm18DIGDcMcZ+GAHwxTiica/BzyRRmr0 XoZfX56mG9FWvpuirzJIoiYV6MXsrf7JwAYP3V/Ef8jKhi+y0WvUy7WslTilSoE8c1nZ DkyeLPbkH2Sb0OqdsgMdlBb6HlQHdfQkrXznvHf3B9YEAgYcbBzN1jRlB2l79OKUvOM9 9alw== X-Gm-Message-State: ABy/qLZEhkuwTOTm7jXbhAvYcpY+pdTsp7+/EGPxmvzKJjqSmWjp2me2 HIKpFuSnn1MbqD3KwQ0DRogy+PVFN9WcBXfdJyLnGobovxqEYuB/nzzzlRibRCuyUTAzxG59xfj fuI0jtJkDN3zJIBAQ X-Received: by 2002:a05:6870:440b:b0:19f:9353:d9b0 with SMTP id u11-20020a056870440b00b0019f9353d9b0mr13312430oah.24.1689020258019; Mon, 10 Jul 2023 13:17:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlG/yzsbrle2mK4hDSP+ymIcBBFgugjNQj9A986L5d0AncrnW2gjIY3q9PjS07ExUBl/iRYYsw== X-Received: by 2002:a05:6870:440b:b0:19f:9353:d9b0 with SMTP id u11-20020a056870440b00b0019f9353d9b0mr13312403oah.24.1689020257748; Mon, 10 Jul 2023 13:17:37 -0700 (PDT) Received: from halaney-x13s.attlocal.net ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id j12-20020a81920c000000b0056d2a19ad91sm155097ywg.103.2023.07.10.13.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 13:17:37 -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, linux-arm-msm@vger.kernel.org, andrew@lunn.ch, simon.horman@corigine.com, Andrew Halaney Subject: [PATCH net-next v2 2/3] net: stmmac: dwmac-qcom-ethqos: Use dev_err_probe() Date: Mon, 10 Jul 2023 15:06:38 -0500 Message-ID: <20230710201636.200412-3-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230710201636.200412-1-ahalaney@redhat.com> References: <20230710201636.200412-1-ahalaney@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Using dev_err_probe() logs to devices_deferred which is helpful when debugging. Reviewed-by: Andrew Lunn Signed-off-by: Andrew Halaney --- Changes since v1: * Collect tags (Andrew Lunn) drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index ebafdadb28d5..1e103fd356b7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -710,8 +710,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac); if (IS_ERR(plat_dat)) { - dev_err(dev, "dt configuration failed\n"); - return PTR_ERR(plat_dat); + return dev_err_probe(dev, PTR_ERR(plat_dat), + "dt configuration failed\n"); } plat_dat->clks_config = ethqos_clks_config; From patchwork Mon Jul 10 20:06:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13307574 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC845156D5 for ; Mon, 10 Jul 2023 20:17:47 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4231819A for ; Mon, 10 Jul 2023 13:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689020264; 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=6Lt3BtWczAjK1pGWk1bVfpBjHD7dTaFpkCieY8rxpSU=; b=cNkbrjcJFsTKJ1KCk6HwIpM70gl9YYlTLxj7sGrSWh/ia3KXaMrv+MOM/rgKP4wNKfzRow 6+4YlFD4d0gykE1c7/GwiTUQowrz09AA2pdQWtsFJv+3BOCNfGp00V9ZJdrkcZ1hcq736a HXB2m+T8mwsE87RH8KZcTzqTFygIBZw= Received: from mail-oa1-f72.google.com (mail-oa1-f72.google.com [209.85.160.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-41-mXGg5pEdPB-psS9NhHZBNw-1; Mon, 10 Jul 2023 16:17:43 -0400 X-MC-Unique: mXGg5pEdPB-psS9NhHZBNw-1 Received: by mail-oa1-f72.google.com with SMTP id 586e51a60fabf-1b04506543cso4818433fac.1 for ; Mon, 10 Jul 2023 13:17:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689020262; x=1691612262; 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=6Lt3BtWczAjK1pGWk1bVfpBjHD7dTaFpkCieY8rxpSU=; b=lwASXTsxpUuJI6qH2pfn0bbQ1+QTD8HBt76S0OpYrFEtHGSZEPfSxqOwkBBpsym+dg Xuy1t6GgCKYz4p68w59bmrXzZ1mOrQhKTFqykvRii57gETF+IvjLuuVshlMUZFtkrDAj GzGHwz60O+jARuenPHa8Q2YQm/3Esyr5NREyE/3ce2SAjoVp6DlcopYxXTMjthM2BPOl Xlk2pKCffp1n0i1jTMdD/MwZd9/aSUtW8cpiM2p2WSwOPvJHnoFtyNuTjlOnHdtyHDTC LNXzE5zsrmz1qVvffwKnTP0o729JEHFKVS6yn8RxxrywFxwKDfiVt0TcQ6oFFSHoxp5T HMQA== X-Gm-Message-State: ABy/qLahLjeipyHMrpRIglV0DiSbUBQG/ddLkIoFkDDPQWYpvzJ0iMXS +uJ7HULp5QKn0E2B2qhFtJUhl451M4QrlVYFDaj5E++W9zPk+VWlOIJmGienfdlNpk7i6Bdx3sJ q6f7KSP7TgHSnG34n X-Received: by 2002:a05:6870:6112:b0:1b0:4899:10d with SMTP id s18-20020a056870611200b001b04899010dmr13142255oae.35.1689020262509; Mon, 10 Jul 2023 13:17:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5cLj5bn3UpXHR1dUTlmhj+Qmb+K7OJTd7/WyAoeWXbjil07VpyzlZI5NQ0gyXvfavO3Rbyg== X-Received: by 2002:a05:6870:6112:b0:1b0:4899:10d with SMTP id s18-20020a056870611200b001b04899010dmr13142235oae.35.1689020262255; Mon, 10 Jul 2023 13:17:42 -0700 (PDT) Received: from halaney-x13s.attlocal.net ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id j12-20020a81920c000000b0056d2a19ad91sm155097ywg.103.2023.07.10.13.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 13:17:41 -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, linux-arm-msm@vger.kernel.org, andrew@lunn.ch, simon.horman@corigine.com, Andrew Halaney Subject: [PATCH net-next v2 3/3] net: stmmac: dwmac-qcom-ethqos: Log more errors in probe Date: Mon, 10 Jul 2023 15:06:39 -0500 Message-ID: <20230710201636.200412-4-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230710201636.200412-1-ahalaney@redhat.com> References: <20230710201636.200412-1-ahalaney@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org These are useful to see when debugging a probe failure. Signed-off-by: Andrew Halaney Reviewed-by: Andrew Lunn --- Changes since v1: * No changes .../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 1e103fd356b7..757504ebb676 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)) { @@ -734,13 +735,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; @@ -752,7 +756,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) @@ -764,7 +769,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);