Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1874468lqo; Mon, 13 May 2024 00:27:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7HUMU1C1xK5Z6xhOdAy28Io2Vak6OGPjAQX56cR6jNWUgl0kQgOfnvaNj5Q7VnLL6Ji8Fcsy4bynJH1U2vwSgoJt59wAu9ttkue8q0A== X-Google-Smtp-Source: AGHT+IFrKYlZjI4nsYTkX17p30ZJTF5hkTokI5qt6llAFMnGA8dxPJMs61BCSZ7xGA8sPhlK5WXr X-Received: by 2002:a05:6214:5404:b0:6a0:7d91:19cf with SMTP id 6a1803df08f44-6a16824bc88mr113842256d6.57.1715585236407; Mon, 13 May 2024 00:27:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715585236; cv=pass; d=google.com; s=arc-20160816; b=AhvZhljOVFZ6A1uYO1QYmOkMA6U+0PP8XAGskFge1J9Cs5yHDSX4WHNW48OESAPMgp eitx0e/zMFNj1cp2ITWy3G2EdJagCuimUitoGgB3GJ7h0eNGhncvmX+La6Y2OLj2dZsb OOSv8kvWJKD+UDphfBNVpgpbISmOoC6PqvN1E6wNOndm0+s1grqh1Gx6v6hU8SRq05t5 EuhEuQqeOozW6uxbwy9yy0rRGLiIEAUT9tC/Uezh8zC85O2dKZTU6hgrfV4vp/5TQSsK v1ChW9P6y5zyElRI+RqpeMj21nat1axsGZ3R4kl6a19nmEqzhhx4XHtsBOBCJm5RwPCX cLIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=3iN0ItRZDrnSlN4ReBOmK3jB09/b+zxkMx2rwDWFhp0=; fh=yPAuYgNNq+SPBwcbUDTbU8xt2jJYfw/qyM0dq/wlqhQ=; b=ss6E4JAr6+2ozreUW9iYPgk/6pAM2EbeZQJFuB39Oz9wvfJ9RPTK1rBeW+1xqIiqEm 6be3d01cdfDzZZTUKitNH760vb3UsLB4a0FVo5/nQ/6lsdjl4/Ox1NtbgAGcOYKOicyJ ajwM7Kb6VYrZucyoEHsOKumx2BKAkQPsTNo3CTHd6MVZWE/6Gx9Q2xvQX2ZvqQcCyK4n M3X/rpaStsy7DjSaTyaAzVwLX/CA739ihJt8JLwlDV3cuSAQpQBEt2YE4AOa2XnM2z4R P1APPQLxyB7/yQraeZtzVx/Rbz6r9QD703lCD7a9v8hIfxWcb8BLo2Mj7JOMsgl4l07H EeNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cCy6F3db; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-177254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b7097si91598456d6.328.2024.05.13.00.27.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 00:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cCy6F3db; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-177254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 267CA1C21034 for ; Mon, 13 May 2024 07:27:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A42A146D54; Mon, 13 May 2024 07:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="cCy6F3db" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6D4B146A77; Mon, 13 May 2024 07:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715585144; cv=none; b=sfqgDX8tCT5+3k3ZGD2f5briml618i/uK94fuZ73dXY7weXkbVEjzua6H3Q7lVlgaW/qL8CDPmuKX/sM30wSS9LXyjaL1oE0QjlaFk1W45XV/LrfGTNYMeT6PyFvVNxNl+1Fz6rMKswWJZpFHhi+BD4Vn2CyFfaasVH+5CNXgZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715585144; c=relaxed/simple; bh=90qi8fWxM1Bs9HINt8y+fri3O1GINnSZ+60me1bYPZg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=johwYwtFNn/YxpESWiDhsGh5wUri3evT8RL+2rm2/bdHPhkUQbAteeAz7v0xIkIJ8xvNfAC2ucNBAtXxEqRQrIO5IysUAiBUPaWmRS/q7bBe4UEp993IT64zP1U7N/hrIYipA+alL9P8pfnd62BPOls4R91+F4kKNAN6NoFfB8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=cCy6F3db; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 06AE8FF805; Mon, 13 May 2024 07:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715585133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3iN0ItRZDrnSlN4ReBOmK3jB09/b+zxkMx2rwDWFhp0=; b=cCy6F3dbOTlV7pzWtlwoZ44WYFXoU2cAF7OG54Sc0QLZlnlGdhfHRvYqZvFzxYGjujiUdd nQMhXPhZvumnfIkPQX0/ZrFylRcn46YaJGRJVqp652RjQLRG3da0gI6o5MdCsINxr97hcw lihvuOARiHJcz9HqMhPW++79zSKHs0OPOpgwmTCBon18G8sOmK8wAc+bonYwEXXrOakIti 2mZHmm/x873gCXflMPdJJbhmybgoZOR5BGt9+II4f+ax6EkdwN2lVsUDQFqprigpmRoUvX 0ku1un7VeG7ZvTmlOoomwYrb4SczoLhLhHPCJJ9fOI/4At6FnuuZ4IR5fe0Gxg== Date: Mon, 13 May 2024 09:26:12 +0200 (CEST) From: Romain Gantois To: Simon Horman cc: Romain Gantois , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , =?ISO-8859-15?Q?Cl=E9ment_L=E9ger?= , Serge Semin , Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, "Russell King (Oracle)" , Maxime Chevallier Subject: Re: [PATCH net-next v6 4/7] net: stmmac: introduce pcs_init/pcs_exit stmmac operations In-Reply-To: <20240511181119.GU2347895@kernel.org> Message-ID: <64f188d8-9336-2578-fb47-ce6ff615acab@bootlin.com> References: <20240510-rzn1-gmac1-v6-0-b63942be334c@bootlin.com> <20240510-rzn1-gmac1-v6-4-b63942be334c@bootlin.com> <20240511181119.GU2347895@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-GND-Sasl: romain.gantois@bootlin.com Hello Simon, On Sat, 11 May 2024, Simon Horman wrote: > > - if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { > > + if (priv->plat->pcs_init) { > > + ret = priv->plat->pcs_init(priv); > > + } else if (priv->plat->mdio_bus_data && > > + priv->plat->mdio_bus_data->has_xpcs) { > > /* Try to probe the XPCS by scanning all addresses */ > > for (addr = 0; addr < PHY_MAX_ADDR; addr++) { > > xpcs = xpcs_create_mdiodev(priv->mii, addr, mode); > > I am unsure if this can occur, but if priv->plat->pcs_init returns 0 then > xpcs will be used while uninitialised towards the end of this function. Indeed this could occur, I've just sent a v7 that fixes this. Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com