From patchwork Fri Aug 30 10:16:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 823973 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp701353wrs; Fri, 30 Aug 2024 03:19:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXa7moc1wWSLL6j9cELOJeO16dsqYexd+N+ScR+79YPPv5p9em3151mWyvkUUr5D/2VCtl/5Q==@linaro.org X-Google-Smtp-Source: AGHT+IF2Ls+la75/1kdPehAHS21iMV0HWI5zjcUr5Rs2piykscTCBzwtIXEQa2t8F/SMY9Or3o9g X-Received: by 2002:a5d:4682:0:b0:371:8bf7:d51e with SMTP id ffacd0b85a97d-3749b5448f5mr4119192f8f.25.1725013165837; Fri, 30 Aug 2024 03:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725013165; cv=none; d=google.com; s=arc-20240605; b=OQPtSVArctSWgA6HYCDSkCGTbw6zcCyY5Zrad4rps85bITzFHDMtDjYc87wOsEyvlF KWA7TSDw6yB+VBEu3Ht7i0YHa8zzBbn7vc4OH/DZj45tzAv3wmgycwIod4zQB1YcIS8L LknKtdHTiZnRo9TzkAX7cxYHS/O88F3mEDSDEF2XB2MU3djyLwvrFnR2Gu2aQT+XA3vq u9TNwFdAg1rqPEqgN0fsf6Jal2W1KVj63TWtHJ/yxV2WYhoqW6osqDIowQRtbUoS/M5L TBUTNe5gPIixRa3bBCF4bc/G8wDUQadXyyA2bqApdSvmQf7G7AKYW0nkAqqCSg03OdFz 9pbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DITMuE/k45R030RiiaTVcnF7dWYla7fjDZtjbbdVJAY=; fh=Eod2Vgq+6u20NMj8si0qj6e3EN9Vp1hMYkzBmyX0NSA=; b=Fsz4aAzefxGPKLswicBh6wrnYTj1jIE283+rvMV6u6wfV8oHlj3E3GOVJk4EYRLcXk 6r2aNOm52iHj2a3wbnOctw2NiAcBTgQnyvyYc8/qQkjYJRSneQc6ceMs+JrkAX9Nv8A5 GXr4AmqQXSNG609zLZz6k3WsyipzWDc3qzmn1jHt4ArrKY8jvvurjnd8e7buaKBQLm7h oQpEgVP56Soyz1nG5UK82smhhYYiLKuztxHMvoYJdALzGKS6UDZ/RV2Gpdyn8Boe5gYr TdKBG0yDDC0FeQLb4G1OgQF/YM+KVYkoWsj+j4Evaxf2f4RWeN65ibksneFehEWhnwqd pUPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jS+k2TB3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ba64045e4si28820895e9.108.2024.08.30.03.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jS+k2TB3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0804D88B1F; Fri, 30 Aug 2024 12:17:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jS+k2TB3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ECEEE889C9; Fri, 30 Aug 2024 12:17:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: 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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 118CE88A24 for ; Fri, 30 Aug 2024 12:17:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42bb9d719d4so7907275e9.3 for ; Fri, 30 Aug 2024 03:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725013055; x=1725617855; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DITMuE/k45R030RiiaTVcnF7dWYla7fjDZtjbbdVJAY=; b=jS+k2TB3Sc3HRSJd+4prIHEcZXE0a4h4Jc2fMg7XQbk+oH0ZH7r7q/fiSawNFODU2i bBLE5grpwQ0Fr7HQIigPcSHy2Fq2whfefCNBtl5hzykbWxx77Em7SqtRLrk3fC3I377J mO4E2o98KOxv/evgtFfyMJ6vSxbv+a3WcdDQEuAs+2/E96JPpRGxkChL58TlxYyiL9FV QLrh6pxzfvHNDl/6DGkk7CeE539gQM74LVEBYRUKnRPwvEjhexDO0dlGZLuHy94mqTNk GiTwMyKSNr5XDUGg9G1jNil7BJWg+YzF9VXO79VBJ9WaQno5vup+qnJfB6l/jaRFagUS nFEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725013055; x=1725617855; 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=DITMuE/k45R030RiiaTVcnF7dWYla7fjDZtjbbdVJAY=; b=s+jAwvDsmLTLvyL3bjOshr2OTzSxOCMHvVWJaLzbN3dMtCCmmBMFoFKWKRBuwz9cke aQtXfd5gHoKvZ+SK/nvuVxlsKevLuqIfrhhpvpoLlfzYCBSv0VGigjFunDwaGlsMpIv0 Eh3fz0D0qomkh09JjZ2HBzzrzO1vqPR9iqy9nTarUjDQeyIVJvnTv2c9DOsYuYMzt+vc EYRdtL7jvkHeYTWfLKFRKni6PSFhvEp3s6vG3LHHJZMmmBt7XfBPcnwleIfPn3eRtAzo Qu9zR/oiz3GfRzfugNbFtaV5uHvD78jq0dNCGl5+/qT6UtdFZ2E57QwqauZ4FrHoalcT LDsQ== X-Gm-Message-State: AOJu0YyIqUJfZzbI7IaVYBldLHyuGwNOQ0FEs1cDnU9QoaMzoeptrImG uSOQBHzRdFhRrs+23M8YK1a3rm54KcpMmTqG8l1v/VfTYeAUQ1PWswqp7/tyPSAHoSu436hswCI VD5Cwvbt7 X-Received: by 2002:adf:a39b:0:b0:367:8f29:f7b6 with SMTP id ffacd0b85a97d-3749b585113mr3885479f8f.51.1725013055203; Fri, 30 Aug 2024 03:17:35 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6417:8cf6:a7f7:ee38]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374b6a3d27fsm472728f8f.59.2024.08.30.03.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:17:34 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Peter Robinson , Jerome Forissier , Fabio Estevam , Joe Hershberger , Ramon Fried , Tom Rini , Ye Li Subject: [PATCH v2 11/16] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Fri, 30 Aug 2024 12:16:54 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier Reviewed-by: Fabio Estevam Reviewed-by: Peter Robinson Reviewed-by: Ilias Apalodimas --- drivers/net/fec_mxc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 0a0d92bc2c..2dc1364bee 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -615,8 +615,7 @@ static int fecmxc_init(struct udevice *dev) if (fec->xcv_type != SEVENWIRE) miiphy_restart_aneg(dev); #endif - fec_open(dev); - return 0; + return fec_open(dev); } /**