🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7819

Re: [PATCH v8 2/2] can: dev: can_tdc_fill_info(): don't read automatic TDCV if interface is down

#7819
From: Marc Kleine-Budde
Date: Tue, 27 Oct 2026 09:19
62 lines
13201 bytes
--4vrkcp45w3iqkhqx
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: [PATCH v8 2/2] can: dev: can_tdc_fill_info(): don't read
 automatic TDCV if interface is down
MIME-Version: 1.0

On 27.10.2026 09:57:03, Vincent Mailhol wrote:
> On Tue. 27 Oct. 2026 at 07:54, ChunYuZhiQiang <chunyuzhiqiang@yinhe.ht> w=
rote:
> > The automatic TDCV readback calls into the driver via do_get_auto_tdcv(=
).
> > Some drivers, such as xcan_get_auto_tdcv(), read controller registers
> > without taking a runtime PM reference, so calling this while the
> > interface is down can touch registers whose clocks are gated.
> >
> > Gate do_get_auto_tdcv() on netif_running() in can_tdc_fill_info() and
> > adjust can_tdc_get_size() and can_data_bittiming_get_size() so that only
> > the automatic TDCV size is skipped when the interface is down. The other
> > TDC parameters are still reported, as they are meaningful while the
> > interface is down.
> >
> > This is a defensive hardening based on code inspection; the automatic
> > TDCV path has not been triggered on hardware.
> > Signed-off-by: ChunYuZhiQiang <chunyuzhiqiang@yinhe.ht>
>
> Reviewed-by: Vincent Mailhol <mailhol@kernel.org>
>
> I think it is still preferable to add a fix tag here:
>
> Fixes: e8060f08cd69 ("can: netlink: add can_priv::do_get_auto_tdcv()
> to retrieve tdcv from device")
>
> @Marc, not sure if b4 would automatically pick the Fixes tag. If not,
> can you add it while applying?

b4 git, but struggled with the new line :) - fixed

regards,
Marc

--=20
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung N=C3=BCrnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

--4vrkcp45w3iqkhqx
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSl+MghEFFAdY3pYJLMOmT6rpmt0gUCauBsmQAKCRDMOmT6rpmt
0uIpAQDH1Yh5CV7Naz1mfslk5xWgp7/vsXgQ6q6lyDPVXRSs1QD/Y3Nqtav23Isf
DkthkKvMFxFn1yjVHXHdbW7ajuSxPgo=
=FaA1
-----END PGP SIGNATURE-----

--4vrkcp45w3iqkhqx--
Technical Details
Message-ID: <20261027-truthful-okapi-of-youth-42211f-mkl@pengutronix.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352321-linux-kernel-netdev=dewy.ru
References: <20261027065012.191348-1-chunyuzhiqiang@yinhe.ht> <20261027065012.191348-2-chunyuzhiqiang@yinhe.ht> <CAMZ6RqL-3EBC=hFmpRyxcD4YA3PiMMnC3o+bAxN+ABDGqCNX6g@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352321-linux-kernel-netdev=dewy.ru
From: mkl@pengutronix.de (Marc Kleine-Budde)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v8 2/2] can: dev: can_tdc_fill_info(): don't read
 automatic TDCV if interface is down
Date: Tue, 27 Oct 2026 10:19:23 +0100
Organization: Usenet Network
Message-ID: <20261027-truthful-okapi-of-youth-42211f-mkl@pengutronix.de>
References: <20261027065012.191348-1-chunyuzhiqiang@yinhe.ht>
 <20261027065012.191348-2-chunyuzhiqiang@yinhe.ht>
 <CAMZ6RqL-3EBC=hFmpRyxcD4YA3PiMMnC3o+bAxN+ABDGqCNX6g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="4vrkcp45w3iqkhqx"
Injection-Info: usenet.network;
	logging-data="1502297"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8sFFngsmohCd9iAhf44pcpuhuKk= sha256:eBCTg8wnsLBT3YmWO8ZujgZTLDvSSa92x8UE64909OI=
	sha1:Hgk0LpMImST/P2X2JpU3woxGyOE= sha256:fsyAO8FI048s5rzCvM2N/mpwMKzS8b8YrYDU4Yt0bJw=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4F249125BE6; Tue, 27 Oct 2026 12:25:34 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=pengutronix.de
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id rzj6rW93LH5W;
	Tue, 27 Oct 2026 12:25:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352321-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=pengutronix.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8D625125BDE; Tue, 27 Oct 2026 12:25:20 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 5728D31AF5; Tue, 27 Oct 2026 09:19:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793092784;
	b=z2pVBvZmQ1ECWawweobMBk20Vj7AYS2DLdM+qXc4NEpN/1UDztp8yhrVBmwdPPDX9BZZ
	 e4xfoVbcQbhaFPdNjjkWEBjiNtASMFfryNDU3w44i69baetzYwzYUE24STp9C1ahSac9I
	 nl4X2fgtEX1EU1IjkKE8y9gZDP81/zX55TzlFuRyLKtrvjLhp3PiDZCQ+AuhGFvHcafvX
	 LOEpttNl32PdWUkihbalSn0bD38SkYzWbIRaNM5zynAhyOVBeqdyWkG57Hs1YLiMJaUI/
	 rKyPJAl7t5Oes4+z1GFGswyuLmmPkyUHYBkux15CFhZ/9B79mBvIXrXeBcB5yWb1tEQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793092784;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
	 Received:Date:From:To:Cc:Subject:Message-ID:References:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=QG+IwVQ9grDIq47IKAf02fmU2aVGD0WubOXaYAEOrr8=;
	b=pf67ZinkCjwuYjgS5gCdynNZv+U136nW0FfTj3ss6eHDq8hLaBbvxclOdnBR+QMnrMhQ
	 T2DUbaJSqz25sETlMXWJt7e5l9M5XQq3kUlD4Z542q2I5P4d+Z7jclmvYozgZW6Tew+md
	 VzHwMvsRH9GEie/9+UyMexRiwf7kctGCUMyxdX71GVctM8gRvz5+tCcK7CbmNcHsxS8rk
	 9H9JaVhuHJyUUZDMzuhMtg589+HkgpFKPl0B2wwq5WdTsxXi3OafwW/pfnVlg7qJSIDzg
	 LvNjXYVz4sYos7C1m2XqspQ+cpQE5v+h8dPDBxwdSJ879C6n7oDfgwnPQQmyFn6fp/Q==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=NZz1Malh;
	dmarc=none header.from=pengutronix.de;
	spf=pass smtp.mailfrom=pengutronix.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AE67606A323;
	Tue, 27 Oct 2026 09:19:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=NZz1Malh
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793092768;
	b=to7bDGzTIjPy2EKBeLQx8pX5XnoOHz906dqTphZoWhj5iNU6YXiFV1oxkuBhSad0t9ks
	 rYnqaaokxGlgNSFZIgkP95LX34MFc0NXA2Q9tipR//Lbg6K7iAOgswT77icwfLdNB3LoA
	 reVocty62kQEBsqbLWQJogZv1jAeFXNUYO7UjQddLcd9pgtbvGsgQt6Eu3YytmNohOhuL
	 M51MBpl274UFOf10+pnzj1LcRWF9N4rzoRGbtx/sseXIoowfgzqAoYaClzMa4cJvYm3tQ
	 rK2qXOqmv65cx21d20mXLC39bRSfyK0+Tgzo3MbSwZTwCLMAKgyx+nMw+/PYvdH+8hQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793092768;
	h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Date:From:To:
	 Cc:Subject:Message-ID:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=QG+IwVQ9grDIq47IKAf02fmU2aVGD0WubOXaYAEOrr8=;
	b=rYG3L4mrYI4h22sFo3NuENoi/1eyhze9cDFz/vqNb5ycSm/djLbh4zL7h20XSmFWvybz
	 BtP5bOAQJfottqu4pB2Nt/tWlvsJcUHwdePhtQu4ob76UDl1gRVl3+saJ+/FHIAcc0rA6
	 W+IAEbYYoEi7It+U3HjQ8kQfDPZtHN1gx3nSgWN2NEJWIyS4Ef//VAajwwkZYHMkuzhka
	 +3mJYnrDo3n9T2tojVjLZcmTIqctZis0l5/W+n+kPoByT6nt1MvA+I/47nO+8iqW87Oo8
	 hMjd6bHDqgN3eh1lkyRXqzr7UibHXxXsZRUZryJzrVtJoxn1KMS7UJVklVO3g/xoMRg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=pengutronix.de;
	spf=pass smtp.mailfrom=pengutronix.de;
	dkim=pass header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=NZz1Malh;
	arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13
X-Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D5B9606A31A;
	Tue, 27 Oct 2026 09:19:26 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7D5B9606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de
X-Received: from drehscheibe.grey.stw.pengutronix.de (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2])
	(Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de)
	by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 28413201F14;
	Tue, 27 Oct 2026 10:19:24 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de;
	s=20260414; t=1793092764;
	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=QG+IwVQ9grDIq47IKAf02fmU2aVGD0WubOXaYAEOrr8=;
	b=NZz1MalhC0cKTsSsbFn8UF9Si5rB1KtOJrXX70I6QXygIcl0L7pNM5xby4Kve8QhwDw7nR
	PgmUSyGgGNtlMxwaeWEfqXrRUtExKD8bvxzWNsDNoDtIRDMR5lE2ptkXmczY+TXKz5kAl5
	kYPvkFBJXaaPWhkdBnuyu7xrSgp76yPPy9HY62HfwYw4dP/yHlnsuFlceCQUU0tGkS//Iu
	lGLoxXKPbJ3TzCfXM+Om51BCedhVslEuolOvZXLrJToI4CsCQVfnI5nViZOF+MEdzRpbGw
	3pizT8qcaPc3DkV17pssN0b6LvhubRM05SAW985ScqBA801VuI0w/Yn0L1RX3w==
X-ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1793092764; a=rsa-sha256;
	cv=none;
	b=L/lcylgeLOZCcpCvWkHNvI2sTImq8U0XDLXWdTkeTAYnth7jHtxJECfTIswIFBmHDhXaB4
	7yHxHeHXM4xRHjllzp6MvPaUjrc2DBHXf5W5lCUDz7Q1rBR4zFkQXcI6h/RCBQ8uTpEvqb
	qGTqXOsG+fcXSj/RgXEhNWqK9TJ6+gKGbD1aBxdcRs4HwZ7IFi2j9+IAl9+bjzLGm6BQzY
	3ck2l1tFyJil9exKHlUvOpo+tm4sTmiEuUIcVvnZbziPrfDkI8H/9BQCc15VlmH2uqb644
	AlEn60ycaYXBWRgbdFnpKuEVzHb2j3qSjCmCNHGhHZd1cg9oY0Gdg4b4kXnnPg==
X-ARC-Authentication-Results: i=1;
	ORIGINATING;
	auth=pass smtp.auth=relay-from-drehscheibe.grey.stw.pengutronix.de smtp.mailfrom=mkl@pengutronix.de
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de;
	s=20260414; t=1793092764;
	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=QG+IwVQ9grDIq47IKAf02fmU2aVGD0WubOXaYAEOrr8=;
	b=WIA2P6FFE/ei5LMhuOuWf/pphPPiMCqmPMlWBPoCVeuH++xV/SDPcXstbQmoIfaZ46yr7R
	qUxJzg0jfRAEiXXx934kUw9hTqXRK1iyXn86GGBOQIxrjUEKlOfxiYKvanQoHz92+fep7z
	hsWHM/yt0FgnD7cGyFwmujIPQhKfEJG7hO5/L8vEhDsbjZUyXSl6tSh+LxNheIGlNGwJUb
	FMZZJausQWQk+wCZL+8kCaL0GZRQC+IHusZ5dyBRCW4YFhIda0j11WdRqpEKU0lpDdTJot
	BiPVYsr+5atchowKRXkOFGjcTckVV7kiK0P6iqh/u/G76VzNbRjuTEHGC7tiPA==
X-Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org)
	by drehscheibe.grey.stw.pengutronix.de with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
	(Exim 4.96)
	(envelope-from <mkl@pengutronix.de>)
	id 1xLdL2-001PMT-0E;
	Tue, 27 Oct 2026 10:19:24 +0100
X-Received: from pengutronix.de (p4ffb23c7.dip0.t-ipconnect.de [79.251.35.199])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	(Authenticated sender: mkl-all@blackshift.org)
	by smtp.blackshift.org (Postfix) with ESMTPSA id BDA145D7AAD;
	Tue, 27 Oct 2026 09:19:23 +0000 (UTC)
X-Cc: ChunYuZhiQiang <chunyuzhiqiang@yinhe.ht>, netdev-bot+sinfo@kernel.org, 
	netdev@vger.kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de, 
	haibo.chen@oss.nxp.com, shawnguo@kernel.org, imx@lists.linux.dev, stable@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <CAMZ6RqL-3EBC=hFmpRyxcD4YA3PiMMnC3o+bAxN+ABDGqCNX6g@mail.gmail.com>