Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7697779rwr; Wed, 10 May 2023 11:16:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kQTu+takbtXZonWangy8Lbc1Ec4T72LsqYyjJKmEzgIGRQHQVJ4ncsy2+uu6v46i8GfHA X-Received: by 2002:a17:902:ea11:b0:1ac:7f56:de04 with SMTP id s17-20020a170902ea1100b001ac7f56de04mr12859144plg.45.1683742617541; Wed, 10 May 2023 11:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683742617; cv=none; d=google.com; s=arc-20160816; b=QbnGWZLLryp/3EWB8i3qhflu9oGWGW37eBoMHpRO/FZm4o26Rj7I/S2mUvgjueFzFw UTqHbKII3FMKXNLI/nxo7zGaPHop2vqIRY1jxX03KnwdVRtCIDxeFXCU4poovPY096dg dpGsxWjqHOs/hDIRNfpxRqI1XwuMwc9JKWp/rdB67lE30aoPKYqMFVg3/9HDYJT4HIEU UtOl15KWNfB1UY4wZtOhpo21wWzZsYCkqDbPQsp2OBW9ABsSrMuxVQrEyf7/OCcY6Esj Zargt8OpNGajg94GjyFv0MyS8xn012X3DMJKtflypaDtd6KUX3saIJrg5J9DF5hTtM+C sOaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/LAmKF4DLtcx5felrrpNMnAfkFOO/8RdGO8zQwg8+es=; b=DEQx1+hvjwsbG1GK/6i1b/8ZJZ3DZ1uqAfsiB65tfq/QDE77m2JhjP69md9NK6sZF7 omLT9BKcLDfTltLp7C9407grV90TQprBePOZ1h6aOLwiixA08y8wmhNUa5zlfKVfF4ay ygaGGUkpgvJnHLQgwIafv1vCDqE4K/53xTN1pe5/OMiCNeFm4pZl0EeX+l1cPMfFtjHB i4mSPvbswOPyT8/jv2Hkf5Kqg1vofV6qZ4l/vT9cuxyNiq6zDVeQU/TpnNJ1MNjXBWG1 EX6c7IKCh/dKO8jv8RCLA3Ailb4M4KB7RcIGMr2jJX5/lkVLsnXe7m0OWVU+Qrdd1NpC F6JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brun.one header.s=s1 header.b=T1Yq4crw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=brun.one Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170903018500b001ab29e00303si2914303plg.426.2023.05.10.11.16.41; Wed, 10 May 2023 11:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@brun.one header.s=s1 header.b=T1Yq4crw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=brun.one Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbjEJSON (ORCPT + 99 others); Wed, 10 May 2023 14:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjEJSOM (ORCPT ); Wed, 10 May 2023 14:14:12 -0400 Received: from mx.dolansoft.org (s2.dolansoft.org [212.51.146.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870F75FCB; Wed, 10 May 2023 11:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=brun.one; s=s1; h=MIME-Version:Message-Id:Date:Subject:Cc:To:From:In-Reply-To: References:From:To:Subject:Date:Message-ID:Reply-To; bh=/LAmKF4DLtcx5felrrpNMnAfkFOO/8RdGO8zQwg8+es=; b=T1Yq4crw8JW3+geXEFxaOBybrw eo0UatDttiInVbKyCe0sPqB4kg6n5jZ6N5MVpywpG8roXOqRcuoDtc82gYa1beSxoaKgRz9V+egRm 4o6VF33Zf9wtC3o/q5/laqNEvMtyErKiC0HxMoo4Tp2wobdwGY8qUmNJNzBarKUhrngcQ+zRDeqTc IuKMhCtLp0hSaGDzcldSXVgyBE1QtK6SrAVpbKo14VhOBo147Vfra+RlENffr+k3Ki/QN7H1+lZqs qAW01qg0rxLuEPAUZgWfh55dfQHPrMWQ3706c+Y4T5rcCu4OyACjSUxqgxtr9ESG9M96yAujEQVXK 9q12+9TA==; Received: from [212.51.153.89] (helo=blacklava.cluster.local) by mx.dolansoft.org with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pwoK2-000oTu-1n; Wed, 10 May 2023 18:13:54 +0000 From: Lorenz Brun To: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 net-next] net: ethernet: mtk_eth_soc: log clock enable errors Date: Wed, 10 May 2023 20:13:50 +0200 Message-Id: <20230510181350.3743141-1-lorenz@brun.one> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: lorenz@dolansoft.org X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently errors in clk_prepare_enable are silently swallowed. Add a log stating which clock failed to be enabled and what the error code was. Signed-off-by: Lorenz Brun --- v2: reflowed long line --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index e14050e17862..ced12e5b7b32 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3445,8 +3445,11 @@ static int mtk_clk_enable(struct mtk_eth *eth) for (clk = 0; clk < MTK_CLK_MAX ; clk++) { ret = clk_prepare_enable(eth->clks[clk]); - if (ret) + if (ret) { + dev_err(eth->dev, "enabling clock %s failed with error %d\n", + mtk_clks_source_name[clk], ret); goto err_disable_clks; + } } return 0; -- 2.39.2