From nobody Mon Feb 9 03:11:56 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 58D14314D1B for ; Thu, 30 Oct 2025 10:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819871; cv=none; b=IO0ud7AmsYT2KqNpLr7DkgyoeH7VqZrD7oGtTr1G5D2ZB5o++L7jdneY/Q5419P+G5HxM+7yysulAcopSIXu9ftw1SmF4Yxp86hgc0HZ/JwvcBocdhO0SuwApvGseToMJfSy8H3IGFtFk7t570fUVt+uxb3Pvs7jFEy4T/0Qh4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819871; c=relaxed/simple; bh=NeJozDG6vfAMv5LoS86jW2wCvGloDnDz+QdanWS+ZoY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LxxWsq+1WDca/S6Bf9Z6yFl0l1I8cnZdsj7c3oHLLAdbFs/XhV6bKL/CGebiZqsXxXKAEx5NDN8TGHwqNoU8UpUIQzSkjljEjha2IKYibt2lfMxPRcjy/QVDkDGQB5Waw+jcdcM0/0DZIV2ocUNSUVSpWjryPA8p9uIFe8ZaYsg= 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=vAn9a9rm; arc=none smtp.client-ip=185.246.85.4 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="vAn9a9rm" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id CD9E94E413EF; Thu, 30 Oct 2025 10:24:27 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A43776068C; Thu, 30 Oct 2025 10:24:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E6E6411808822; Thu, 30 Oct 2025 11:24:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1761819866; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=2s4YXZ006r6JZP+ciPRm1kPsUk3RftNVPiuxZBb+ZTw=; b=vAn9a9rmxnbtvZT/vKNskkN65m9GgP+3q8h+3M5x//R56m/gemmelQiAgN6FMK+iR3EDB3 btIbRjEhe40kR/XIjhowoBflZXk+RfqSvUrtcw+FQqthYO8xL2TqurCVq71N4Wf4AOyvCt eYbKAeN73cEKSTC4Da/4s0L72RibvqH1zz6jEWnVCEWhuKxyTvhBfrvrdcauaQeHUobGRe EbUwK9rs+70XURh9KN1stUkOr7wkfRiMbIp1bheey9U/ZLTXVhh2l0Lozy40njWDR11Skr VPw5JTiHMNTNpntmQk/035OzYvK4AP8+mUywR9mUAn3610M++Eju2SaUae5mrQ== From: Maxime Chevallier To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: Maxime Chevallier , Simon Horman , Boon Khai Ng , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , Thomas Petazzoni , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/4] net: altera-tse: Read core revision before registering netdev Date: Thu, 30 Oct 2025 11:24:15 +0100 Message-ID: <20251030102418.114518-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20251030102418.114518-1-maxime.chevallier@bootlin.com> References: <20251030102418.114518-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The core revision is used in .ndo_open(), so we have to populate it before regstering the netdev. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/altera/altera_tse_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/et= hernet/altera/altera_tse_main.c index 6ba1249f027d..c74b1c11d759 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1388,6 +1388,8 @@ static int altera_tse_probe(struct platform_device *p= dev) spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->rxdma_irq_lock); =20 + priv->revision =3D ioread32(&priv->mac_dev->megacore_revision); + netif_carrier_off(ndev); ret =3D register_netdev(ndev); if (ret) { @@ -1395,8 +1397,6 @@ static int altera_tse_probe(struct platform_device *p= dev) goto err_register_netdev; } =20 - priv->revision =3D ioread32(&priv->mac_dev->megacore_revision); - if (netif_msg_probe(priv)) dev_info(&pdev->dev, "Altera TSE MAC version %d.%d at 0x%08lx irq %d/%d\= n", (priv->revision >> 8) & 0xff, --=20 2.49.0