From patchwork Wed Aug 28 12:10:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 823158 Delivered-To: patch@linaro.org Received: by 2002:adf:f4c1:0:b0:367:895a:4699 with SMTP id h1csp755059wrp; Wed, 28 Aug 2024 05:12:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkFKNS7oFqZjPLIJLBkj9+9BOnNF74vnulGP8/ojDbelsJ/nslbhumJ5a5pOsVqEYsXocVKA==@linaro.org X-Google-Smtp-Source: AGHT+IEvc5AgGwpGSs0H/1jYhsDYURQFT5+av6AVuufFTLVd2RDyuBAKXFAZUPSkrq94F/z0APUx X-Received: by 2002:a2e:a1cb:0:b0:2ef:208f:9ec0 with SMTP id 38308e7fff4ca-2f55b6740dbmr9905421fa.14.1724847151736; Wed, 28 Aug 2024 05:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724847151; cv=none; d=google.com; s=arc-20240605; b=g1Nlc1j+0ifXBwcOI0/vLxSGqZyIYiozPikOHALTNeub8T3IJdkMO0QV3MLa28HcE1 B9gBS5daP1jvLNWlbzkG1AJ6X6FNrJ3bfqACUKBwLSWpCQpGqOcYthNV4RVT82l1z4YW xKT36eihnES7kSVVTge570ly0/ZfJsPaeMcZSJh3JCPEJmDMZI2+PGBYDM79Mu7BznLi cozgg/oHVVaLWsOsEFwsA065KvWCl0YFQE+PYVRfKEK4mhB1UdL++G+T6ImOxBsd1ATO obr2SqFMQhso0e3z+VvENIeS1sLxyrT8F7FUF39d0aWWE43DkJaISwNXZAOGSV6IcAtT bTpw== 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=pSCk/K3y0znMBwS36qz04ulKJ9c8kUuxfDOEXC+T2eY=; fh=Eod2Vgq+6u20NMj8si0qj6e3EN9Vp1hMYkzBmyX0NSA=; b=lFfCEhMo05/o/oI5Wi/EfM5nMLZlz5+2TDZwc0vwd4JY3laX74Yd2EBvNUJJlXcHfa VCN190zIEZJx2M6vWfDUV8pFOHrPVLZrPLVbajZCeqQozYGCuegliQV3AuDdFIphCVrb aQVC4+BzoKMD7u8pNluGsY7HkzQRR88Dv9aSKtqkN9dEzlzssx97/qflhbo32YETQp+4 gc/UVsHsbBSQCXbFbBe/WtYBK9Wg4Vz7fyD0OUo1cv38Ll/6QGeC7S5+uXKEdH+uebli nVJKS+aH/Hq6VdBfaaouQ56XrVg9AmD6pt7bsjzSk41x66WfUyexYSLheN0aRzsCz/eD 4YuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VWodHQFv; 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 38308e7fff4ca-2f40486949esi43892211fa.248.2024.08.28.05.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 05:12:31 -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=VWodHQFv; 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 76CD388A2E; Wed, 28 Aug 2024 14:10:59 +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="VWodHQFv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B6CB688A2E; Wed, 28 Aug 2024 14:10:54 +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-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 4F19088AA7 for ; Wed, 28 Aug 2024 14:10:52 +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-x32b.google.com with SMTP id 5b1f17b1804b1-42ab880b73eso59982785e9.0 for ; Wed, 28 Aug 2024 05:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724847051; x=1725451851; 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=pSCk/K3y0znMBwS36qz04ulKJ9c8kUuxfDOEXC+T2eY=; b=VWodHQFvhvknrees0AVzYVR7rHKsD8oQHl7LeGQ9W2vtr02mH0NtINHnX1fA8+GER3 E4Gh1QRFh+nPZ3wvWGlk4y9hCEU0L2cupWY5hez+fG+Bl7/fmR5JzVkKbByKVadf/Iwe /l95UThNbGeKFc1FY7w8GOmQzzRvj/P69j7UpJl5fsYderY6TsKPp8/kXpQuF1ycKGeI TE2peKG8loQHxQP8Iz+K9aty3ny+z/XlGiRQuiMsKX5IxFgrxODR2G6SkgBcX751DTvn Q93hyhIJycTPEPm3q2mPji9nRwKJYp2z2xlNI41PZ+GhzkwO7srEyvl1fnWaFiCSU4dy f6HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724847051; x=1725451851; 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=pSCk/K3y0znMBwS36qz04ulKJ9c8kUuxfDOEXC+T2eY=; b=YfHpqvb43UrQLHDnnnys728qrYkQYBWpmxwp7QQbi29ZGSqIUIrPIIf3lbnp8uxBHI +jlzeDD4Yt/LBO1/uDKIdzLEzhNeUGKyCz0zYyUbxHdbDZuI4kbJGY3KTyN7aZ9/yeXK c/QOA3SYewQYVIE1uTmVwMemhk5N3P0eBaT4XV6oio8I6SLg5+qXrqaZgXZLZCjQhyuf sGUmoLIoUp/cU1Bs0yMRQ/ZgY2JkgCnns6eXm6uJlY8L6/ZP8DXZBsfFPA16A3B5n5Q/ D90BYVdVuLWNrZAE+lfuAwDTQDqkvfnQmrD1DyALRDGHYIDaz2qgywxyCkdZTAS7Nik4 XNOw== X-Gm-Message-State: AOJu0YwGZib6j4GXLO6GsoPZRZ8z9rpsdo/pm6UrMfz/OHM8Qq0M0AlB Spq2Fv6Lw507YBZBvPRlswBzHxYo54sMZMkyWnBfTvNNXa0cnPOvO0tMM2Vps3SyaaJ1YH6+98v AP1I/lnHg X-Received: by 2002:a05:600c:4f83:b0:426:6320:7ddf with SMTP id 5b1f17b1804b1-42ba66c1a10mr10959975e9.35.1724847051555; Wed, 28 Aug 2024 05:10:51 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:8ac3:aada:f033:985a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ba639687csm19470365e9.8.2024.08.28.05.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 05:10:51 -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 10/13] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Wed, 28 Aug 2024 14:10:33 +0200 Message-Id: <4d8009789411a42fb860fcd00343c73d8fbe628c.1724846454.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: 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); } /**