From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 68FFA41AAC for ; Fri, 31 Oct 2025 16:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761928380; cv=none; b=HKtooTakjCLGj31FLiiW1neU/Zu9qmZY45MkjQqOD9TjUE2YWlcQH7vBeVfz/MRylnYF59+xQqPhZWQ7tKX4r+jVCLkG246uB8oqQq6x0qV1YAvRDl3tFTh95h++mG6165eL6z84rxJFco/P8vlCUnqO2/BRcDzwQ5y8a4P40OU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761928380; c=relaxed/simple; bh=C+M6TEkYf6rnRmSh9Fn3RQsgpScwzySYffxtCQDz4ZI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oO/UEDq2cW8jypQDoQdH7/OHuWNHqyglZUo038DxBkTdfoW7BNWvsnErycOlqxFGlNUJgngBqd5HTQse2FwXQwys3X17ASVffcOAoS22BwDVvH/wmBDQhYXzurpyJvMWwiEItBYrd8DkXs1W++9rLg/5FF+DF0Pny9zdUHpqM5Y= 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=a7ywpVnH; arc=none smtp.client-ip=185.246.84.56 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="a7ywpVnH" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 6C12C1A17B6; Fri, 31 Oct 2025 16:32:55 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 392CF60704; Fri, 31 Oct 2025 16:32:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 12CD711818025; Fri, 31 Oct 2025 17:32:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1761928374; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=Prc2FqBCKdzHY6nEpuB9LU3Sy57F4RCmA/VQbF5rrrs=; b=a7ywpVnHwP3DxXaeUHlnNNOmBr68JW6/D8Sdwho3OVgzpATcfab+7qTznAIsRfgUC0UjcM Ck+5JRJ4G6j9mqujE5RF3nX80IIkAgSgfA0LnNCVMHDZ/gmCBXVi/PIUkX+FMk/A3GvmTJ SUOyt2bKTHr5ykKw1g8WKy6cGw6KhQALaV0IZebpYoGbrkmCrgfGY390B2shmJ4JWBA8K0 zfLffb1eHwV04MuniPkW1+l8CTFIw1+2ub3U6vvoaOwthYagCvsMK8ypY4WGRRJ+S7u2Dg SvXmR3qCclupBXLg4FX7hYdt+qWBbQ1rFcXox+HWN3M+r0WhhpD85PAovVCD8w== Message-ID: <08518010-3997-4e11-b17e-94765e9c1ca9@bootlin.com> Date: Fri, 31 Oct 2025 17:32:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 2/4] net: altera-tse: Read core revision before registering netdev To: Andrew Lunn Cc: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Simon Horman , Boon Khai Ng , =?UTF-8?Q?Alexis_Lothor=C3=A9?= , Thomas Petazzoni , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20251030102418.114518-1-maxime.chevallier@bootlin.com> <20251030102418.114518-3-maxime.chevallier@bootlin.com> Content-Language: en-US From: Maxime Chevallier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 Hi Andrew, On 31/10/2025 17:15, Andrew Lunn wrote: > On Thu, Oct 30, 2025 at 11:24:15AM +0100, Maxime Chevallier wrote: >> The core revision is used in .ndo_open(), so we have to populate it >> before regstering the netdev. > > All that open does is: > > if ((priv->revision < 0xd00) || (priv->revision > 0xe00)) > netdev_warn(dev, "TSE revision %x\n", priv->revision); > > So i agree this does not need a Fixes: tag. > > But i do wounder why this is in open. The revision has already been > printed once in probe. Are values < 0xd00 or > 0xe00 significant? Is > this left over code and some actions that were previously here are now > gone? > > Maybe a better fix is to remove this, and make revision local in > probe? You are correct. I was focusing on leaving the existing behaviour untouched so I didn't dig any further, but now that you point this out, we can definitely simplify that. The revision is read from the priv->megacore_revsion address, and stored into priv->revision. The only other spot where this could have been useful is in altera_tse_ethtool.c, .tse_get_drvinfo(), but here we actually re-read the version from the registers... So indeed we can keep that local to probe, print a warning for unexpected version, and just drop priv->revision :) Thanks, I'll respin with this. Maxime > Andrew