From patchwork Tue Sep 3 08:38:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 824886 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp2298245wrs; Tue, 3 Sep 2024 01:40:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX21GJPQdNToISsMdxHmk4E8tevLkjgc8yyBqO8eJgP+6eONaGJtSHCHNHS9wlwWHwI96eJNg==@linaro.org X-Google-Smtp-Source: AGHT+IGOiuidg93zwPxnwRPRPT1AvbEpyL39I1yph4r4vr47V08jDzUzBj11nCUh4/x1MC0vd5hr X-Received: by 2002:a17:907:3d92:b0:a83:94bd:d913 with SMTP id a640c23a62f3a-a8a1d29ba02mr202725566b.10.1725352852151; Tue, 03 Sep 2024 01:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725352852; cv=none; d=google.com; s=arc-20240605; b=UHDeSecQgRtMoNOHkiLGbxqySmaAD8XO4TGp8TUi+4HG1B3Qx/ht8qcMYEAFtaqaQo 08AkFE3dcDdimvaL4dlzLeGydFTEeFOH3lExnT7yB+99GEcNbwEfPSzjRTS8FVHoXYjy CLdxed5aDiswTsWekvQgau6qPc7CsYlMLQqp8UCVeGjsn5kNumsqg6SzlldQ/SJyqrpo kTNW3T2LNilxXKvPGkkhxNFrN4WG6QT0IdVTFGFGWk0TG5DKu1bg9crhHO4HIN5qwSbD 6cXWm0hUp9IWjvrZUPr17zsqhMpeLZWTiewMzGZzk4V0PraLstOlwhpm1jaW4qqn5JLI H3Aw== 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=tCjcDCoXb5oyRDUvYeiyUQT0buhWu2O71HdCxslK+58=; fh=Eod2Vgq+6u20NMj8si0qj6e3EN9Vp1hMYkzBmyX0NSA=; b=FYMk7YrPiPevjaQgFyYOlxeeMuEBz/Ghs/9YYm4UwQLg+Dlqr4wa28S/s42jH12ziD 7dcel8nfeELfp0+07BjKJ2SYlIJofXz3x4B21PnmnJas++usu9kpvptNcKufq0A7h7Rz 2jJUCVZmW/wwO5iqa3PDD90RbrDGjPWjz2EfrOYPL8JxUR9zu7h5BZego3hP6eaIcpiT K64N7jJOEPlGHEqK44pMYY8nAGWft8lxjfAfLo+Z/PpRW5TqL4uEJZtwAk/IVw1T+Cqa WUD0nFPS1IY2RyUS3FPoX1obBf5zkjzKasfxDFFZPEq/YL7+E93VOU0Lp/4VXzMzCcO8 geJg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UnnFo9Np; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a898916b7f7si878332166b.559.2024.09.03.01.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 01:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UnnFo9Np; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 B879C88D16; Tue, 3 Sep 2024 10:39:03 +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="UnnFo9Np"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 014E588CED; Tue, 3 Sep 2024 10:39:02 +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-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 1239788CFA for ; Tue, 3 Sep 2024 10:39:00 +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-wr1-x42d.google.com with SMTP id ffacd0b85a97d-375e5c12042so333894f8f.3 for ; Tue, 03 Sep 2024 01:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725352739; x=1725957539; 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=tCjcDCoXb5oyRDUvYeiyUQT0buhWu2O71HdCxslK+58=; b=UnnFo9NpulXO6SUPPzXJ9mFx4U8RW2tXvVfdV0dm4fweUVy3Hqw917Vud1rx/wPOdf lCYKQ937DFnv82nM0wseGmxx+by8m8JRVVHRH8pXICT2lBaf18szF2/qmaN8SX0D+If0 OFG5yVrlCAJQHoXJ0i+rHYa6bk+dJ6b3nj8s5OQ+kY1eqPR+95pnsk4UNlI/9Yil+giv npjEcGNbVNUE1IoLe5GINT6JKlLTfgRrKji+RNvhOTigzRgXyd5EuVNSkSkSM4yX881f uWtYj65C/VhgVLfh5+3Sj39pwvsygiKxxa0RFirJzYOJ2OyEJFlonyJBxEfRkeIBa3gP AI9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725352739; x=1725957539; 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=tCjcDCoXb5oyRDUvYeiyUQT0buhWu2O71HdCxslK+58=; b=sFPDQLvcUja0cLa25nB+aUnlRGmvUl0IMwsgqcGAbGV+g2IgpAoF14h1IX1W1Mu5d9 waRzLG190Sfqmm2Bb7JnVL/nW/EjvZqS5yj/cOZjFy0bs94M11hZT/oU/ba9Dk6R7EVG zwzqwhN5skBeTK6KTDm2SLnxaPrGliwHP+tA4ITE1ljxe1l8y4ViePIVfL5RpzpRY/tG /6m/D/GwiqoSTIUhUYvAtBdIncpkkFA0K8BPsEUokbWrOY4W/oFgMF8CerLEhAewZ4WO bsDDzOIcjQPuvezeALSSi0jAqwHQsQ35JbdX29k4y04DLoR+vBN6uRYhpqxmj0WWP0RC CKMQ== X-Gm-Message-State: AOJu0YyVQ/mB45AZZbpoDZjjvdXjvrwzfQML5G4lNquulzPWj0E6cEPg QQetHPrldP60tmumFKZ/ylZZclJAdMwLpgvtMS0Ac7qaNkeo0lnC1s21Lu0BasPDVqQgxn60zAe 58EzxHA== X-Received: by 2002:a05:6000:1564:b0:366:ee9b:847 with SMTP id ffacd0b85a97d-374ecc8f13cmr2058695f8f.14.1725352739257; Tue, 03 Sep 2024 01:38:59 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6417:8cf6:a7f7:ee38]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6df795asm163103325e9.21.2024.09.03.01.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 01:38:59 -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 v3 11/16] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Tue, 3 Sep 2024 10:38:08 +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 0a0d92bc2cd..2dc1364beec 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); } /**