From patchwork Wed Sep 11 09:58:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgRm9yaXNzaWVy?= X-Patchwork-Id: 827387 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp711483wrc; Wed, 11 Sep 2024 03:01:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeZ0lJjjQWFtn28fF6TbBZgk3YE/dC8HTRsIwwDoXZYvvUg4XYQu2AZCLiWwHWcPvUf5RcLw==@linaro.org X-Google-Smtp-Source: AGHT+IGSqzt9GnB7nCZiwnsmQ9tpBYDknrDOmczTD50/hZD+Xr61+C7kpiBSQ3Q7eS8So20PlcPJ X-Received: by 2002:a05:600c:314c:b0:42b:af5a:109 with SMTP id 5b1f17b1804b1-42cae76cf52mr99103315e9.24.1726048910642; Wed, 11 Sep 2024 03:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726048910; cv=none; d=google.com; s=arc-20240605; b=IXVVDLWZ00il+mlm8gA+ARt88iBFBvfLYcuYJ0uEGuw7aFL8OTty/4NhUeKps9Udv6 r6p+IcZdUORk8vZPpPbcrBc/s3fzWpjzi2YkVxYT21Rfa3ZxCRooTMvX77fkAYlcFggJ WPAvfHyK0VaoVr6AxPCvgnXYwYBg81bIZlWq+x8LxW586NCxJWbm4Uvxi0jYGWmsYFdd ztdoflFbzUlucLV/akdQY819JIZEG5b0j7bpCtkN7YOhCxmun8lOqnD0yNnC2Q3J9mZ/ vJJYj4AqHWNHUyb16ba2cv3w74bl89HY0+8MUKrtZB4sWcNVp05kHwbm21Qml04vqPAI hQyg== 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=VRimkpwVlDqWa6JJ13luUBSa+NfxP2Trmtjx6FpFO/MhLPw6lF5b6zGVu1DjIP3OOm 3Sj8y85+61JFvpa+CanaN3IH5JcaUpduRDaKDW5NAT+rMBI0kywiU9lQPxX9R7Zzt0t+ z+vIj1xtx/Kq0LdyYrEUCcD62i8HAlacMm9EPSs477xQdsL85Fo1tQm1fURXX3z9eXBS m0ZaRXrSHAHaUlVLQqUCH8UHqR+YYLFdtqSkq8A36LkoGm7dKjUVOpl6gzE4A+Ix20M7 KyF7vskeqVze8JvaCfTa9rH7iwv6EwvhxF3pEngF+3pB7VZ70+KOhr0TfUxP+e+Rt2AA w4Cw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rt4or0Pp; 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 ffacd0b85a97d-37895603314si3845630f8f.176.2024.09.11.03.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 03:01:50 -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=rt4or0Pp; 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 78C2B89261; Wed, 11 Sep 2024 11:59:09 +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="rt4or0Pp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09FFF8925D; Wed, 11 Sep 2024 11:59:07 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 E70A38925C for ; Wed, 11 Sep 2024 11:58:57 +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-x334.google.com with SMTP id 5b1f17b1804b1-42cbc22e1c4so21054425e9.2 for ; Wed, 11 Sep 2024 02:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726048737; x=1726653537; 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=rt4or0PplYDrUm1HISIoR2tu4Bf2qfmnFcgfaqb5SF8G9dnm1s9wBCIC57AnWo99b3 UtB85AFf8b/1V0R2xpkMnTc0xgxKDIO2G08ZYoyHneJ1dealwSWTunxH47wMfbujZWrg +UiIiOMD+z2iuF8IKLNRULnltwdsRE+TOuMJ7N5f83ivGiGp595Db5qp9wA3ZKIChTYp /lsQkNVhnQ/t0nlYdz4S0MrWbPK6JvuVHZKjfpBFui4139HQZKiOghhmHIIoQhPtnEyw VVuEO2/QwOs4BH30/ktcU746gFRq/42MJPW74MTE/bnOqUeIhjX3P9pZUiVQ5cah/y9U xrHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726048737; x=1726653537; 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=k1SQCFpi3rcVoWQVd3FdxhhGwpkGfWEQvWyxPi/Ttt6Z70DM03KLHnOL3Kwu586FCA QYXF1ZQmookmzHmDScF0UTO3hFo/IeglUcjxim1imoIw8bBLhgcrOiD3gCq2+Na/H9jg sirli+X40xb6zhJlhLh9HGJ1tmUXcKEqCPZ2ctPGhDETFadtH3TSmd4OaJJleUIvVoJQ 8Y7JYi3k9VI71S7qjEXiMU37MeAFL2laXMN/7IOapU/IoOl8co3iNzqm6bSs/xWQmuef 5N2uS44WUNeRuLk9apQwbTCDZaJKBYJMlE6Lm5hXWwWwfQLsB5IUePqlFyE29UgmNrSP JxKQ== X-Gm-Message-State: AOJu0YyyIMqUUI2yS8dxOPKMLA6rD1sBC0MKngHaG2aUgQJTFlhvTh8T wscX9u8iYPRh7Jv+MxpZttzAzZ9E3gQTLeHbw8Fav7HuBiqEax0WB8CTo8Dnggkwf6eYUoEbkvT +Y4sVfA== X-Received: by 2002:a05:600c:468e:b0:425:5ec3:570b with SMTP id 5b1f17b1804b1-42cae79d262mr85779975e9.35.1726048737147; Wed, 11 Sep 2024 02:58:57 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:7d92:535d:cd3d:335b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649bafsm11300507f8f.7.2024.09.11.02.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 02:58:56 -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 v4 10/15] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Wed, 11 Sep 2024 11:58:23 +0200 Message-Id: <2089194cf5b0895958a74cb52dafdcbf1de7c739.1726048404.git.jerome.forissier@linaro.org> 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); } /**