Article View: linux.kernel.netdev
Article #7798Re: [PATCH v8 1/2] can: dev: can_fill_info(): don't wake up controller if interface is down
From: Vincent Mailhol
Date: Tue, 27 Oct 2026 08:55
Date: Tue, 27 Oct 2026 08:55
41 lines
10642 bytes
10642 bytes
On Tue. 27 Oct. 2026 at 07:54, ChunYuZhiQiang <chunyuzhiqiang@yinhe.ht> wrote:
> If the interface is down, the CAN controller might be powered down and
> its clocks gated. Don't call do_get_berr_counter() to read the bus error
> counters if the interface is down, and adjust can_get_size() to match.
>
> This removes one trigger for a synchronous external abort seen on
> i.MX8QXP when "ip link show" is run on a flexcan interface that was
> never brought up. The underlying cause is platform-specific: on i.MX8QXP
> the CAN clocks are gated through the SCU LPCG and the subsystem shares
> the IMX_SC_R_CAN_0 power domain, and there is a window after
> pm_runtime_resume_and_get() returns where the clock has not reached the
> module yet. This patch avoids the netlink query path while the interface
> is down, but does not root-cause the LPCG window itself.
>
> As a result, IFLA_CAN_BERR_COUNTER is no longer reported for down
> interfaces. Userspace must treat the attribute as optional.
>
> The issue was triggered on an i.MX8QXP board by running "ip link show"
> without ever bringing the interface up:
>
> Internal error: synchronous external abort: 0000000096000210
>
> pc : flexcan_read_le+0x0/0x18
> lr : flexcan_get_berr_counter+0x4c/0x8c
> Call trace:
> flexcan_read_le+0x0/0x18
> flexcan_get_berr_counter+0x4c/0x8c
> can_fill_info+0x1f8/0x434
> rtnl_fill_ifinfo+0x8fc/0xbb4
> rtnl_dump_ifinfo+0x364/0x448
>
> This is the same class of problem fixed for m_can in
> commit 91a55c72a821 ("can: m_can: m_can_get_berr_counter(): don't
> wake up controller if interface is down").
>
> Fixes: ec56acfef2af1 ("can: flexcan: flexcan_get_berr_counter(): switch on clocks before accessing ecr register")
> Cc: stable@vger.kernel.org
> Signed-off-by: ChunYuZhiQiang <chunyuzhiqiang@yinhe.ht>
Reviewed-by: Vincent Mailhol <mailhol@kernel.org>
Technical Details
Message-ID:
<CAMZ6RqJwMyaz_qO9grYU6JQcMQEr0vBJUngNHAqBuZP=Apk1nw@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352296-linux-kernel-netdev=dewy.ruReferences:
<20261027065012.191348-1-chunyuzhiqiang@yinhe.ht>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-352296-linux-kernel-netdev=dewy.ru
From: mailhol@kernel.org (Vincent Mailhol)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v8 1/2] can: dev: can_fill_info(): don't wake up
controller if interface is down
Date: Tue, 27 Oct 2026 09:55:40 +0100
Organization: Usenet Network
Message-ID: <CAMZ6RqJwMyaz_qO9grYU6JQcMQEr0vBJUngNHAqBuZP=Apk1nw@mail.gmail.com>
References: <20261027065012.191348-1-chunyuzhiqiang@yinhe.ht>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="1497104"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Ggbg7iyD/77yEQGrTSb4SI5LXtA= sha256:ITN54AjZUcRkniet31Q4cSm6MRZAhERX2l6nx42+fPM=
sha1:Yv1H0wL7kt3z+rBx3SJ+AO88/BM= sha256:184KRz/fhoCxnvaZ5uAvCK/HhXMkgi1K89U7uqcdHeo=
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 9D73E125BE0; Tue, 27 Oct 2026 11:56:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=kernel.org
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 XRfoVGPT4CN9;
Tue, 27 Oct 2026 11:56:28 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352296-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id B86D0125BDE; Tue, 27 Oct 2026 11:56:19 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 9799227B58; Tue, 27 Oct 2026 08:55:54 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793091354;
b=WSX107iD2HYC7Jzc6rhOGVltqys7HrB+16xQ34ZG73UZTU5NvyWmbUuTqqj2Hn1Q6OGg
DpK0VcuPXwEE6bFGNFIUvrSLbYRQ8mStEYrwQ1VA2HDNxmzUL/UkBZlh480c+JFYq1dRZ
LTBya6+4SYTWnch/IkfdDaoctNfq5SOhhymqitzCNJBjW8ya1WtCWMLUNq40xbVLrYqyY
/826Tby9048cQXK49eY3DD8h9Q/ccH/KWNJdfK7Es73n1H/O5/EyFwV2FxX+aywglf9A2
/Ud93cFaUhXCzjMIxpDlUEwu7c0xOxzxkoktqfqNMgKSb5Vgz/VQ0HfvmqeRYzZ17TQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793091354;
h=X-Original-To:Received:Received:DKIM-Signature:Received:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type;
bh=N+roS2hjC/wcKqOTe3oUy3DxdOVJ6Kmbylk65hYNNtk=;
b=zr6ZSobZua5qmPORuftrcoQ0I69IiaKJQgJ7jzZlXB3BsmNYHONhYDViUSZzlF0WzzF5
xS78k1POoQCAVYvoGuGOzhX3lkW4qedlk1J6ajuRpVBF4F/6ogVhBr9ocS2ECSBgZq14x
/oxj3Xni1V6aIskOBDByc+7IVTEPhoGHlLrvY0Z0rvU8tb15xk6cQUvX0GWZlHNhlN3Tt
Ib9rxR6n68Hj/FnuwSfMEzH10InaNytlYn1frBgpQ8pe58QPjSCDmAfmXKp+lSzNC3+dF
IP/Dh2O8w3VxxcOyD74GZ9QlzdsGkb3X6WBjm1rWhEw8maZSGJXgeep7k7z5q67pt1g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X37gobev;
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 4FC14606A322;
Tue, 27 Oct 2026 08:55:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X37gobev
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793091353;
b=eOWqC9ox40gccWwfnygauxsZHYjdK5gtcw/+ak9ikBeJKRRsO48f4vD3Jbi15gUJMn4j
3aU4iGoVTQKrIBMBBTJq8HXku7qcABkxzCPC74kTCyZ90zpl1YW2GuqceoCfEZfnqNTq1
EVzdk0BCUPvKzfzNZxrqIz3+qmbxDZ2pXi1LtUg4n4eQPNE7oVb9rlLiwp34cHhvqaQPm
KWkjGd1/NpoqjldhsGpKRvd0ztxK4RVvlZvvyEGdYcbQVH+bLwtGpdpSrrqU31BZykf4T
2bZWYcdEak+tGH1Uyz7cy/yptjKFeyjZajJwUIIDk/h8mXDpaefG0sclLzC90uEKM+Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793091353;
h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
Subject:To:Cc:Content-Type;
bh=N+roS2hjC/wcKqOTe3oUy3DxdOVJ6Kmbylk65hYNNtk=;
b=Ip0aL3Dy6LQjBzzMq4FAcWmy3tCqUF8u+FgVvuJAib1QhL27BecrIVXGvgIMtFi58L6N
Yzbe0izfGju7/sNwGXcjj53Xs+R4cz40JgqEHkiNepjyHzX2EN/IaE+EwoGr7OkCqSDrL
VLnlLr6IxfrEKGQuTsVKT+e9ucfx4lxgE9vFMbgOGalWuMWqRuQ5XFfCmdFRTo+UjcUg5
Glka0VMDSi6xW0i2LBgXBW1sw/xX/fUd1/B8097TNwdo1aw1xuyECNUOerSwhpRDbALgK
4/lC2MfEGnzk+CCcqQEwGuH6/ZvURIx8KfYbvXfL72hsvyhF48iq6UkhigWAWbCkSmA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X37gobev;
arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32344606A31F
for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 08:55:52 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC50A1F031E0
for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 08:55:52 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1793091352;
bh=N+roS2hjC/wcKqOTe3oUy3DxdOVJ6Kmbylk65hYNNtk=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=X37gobevIHgsMWSMYDxBeNnPo5a57h+FI8Gu2W/EisrKRqyvPj5y089nAShzkr4Se
fTCv2Me9O0hWiOIYCwp5knFJKrY9A806+37t/WKQ4KGNLNtN08oFhrNH8/CojLQGGb
ygJqjTkshmkxz7U1EgGHtwSkRVqbEc+76ei/qmgCktrhaOTjFGJRjqrQ31HHZys3N4
35hWdiceB5b0NPpuerTYaP679FuQD6lIEo1thGQci0I+wRAykucHVaxv6Hq/codD7A
4H0/enzB8NJAG6EDmgG6v9f19yzowMM9PT6tmJUHUTi970bkgicGXZp6QO6JxmMD4z
RhhiCmpJWTRvw==
X-Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-c3f04e0e65fso569586766b.2
for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 01:55:52 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AKwUvBz8/PyYMN8eTQIrOGT8Y420kyjXWwpfaUSXV7hXcGyPqociQRVcqu4UcliYhQUSd/E8hmQqBGc=@vger.kernel.org
X-Gm-Message-State: AFq9FYLKWSAO6G+I8Hi9/czn8DSDYW649NljVPd25uf+fauzceQmcoDC
F1BSbdYZMcho3ueqyV/2Eu3EV+GyojCsJ7CCXEidKFEOLoPWaeCfjJUWRvhE2Dx5N9D80vQEJyl
ExO8gaqvBhIhZlSZ2+feSgnWbJOwA/7U=
X-Received: by 2002:a17:906:c10b:b0:c46:5973:2a1c with SMTP id
a640c23a62f3a-c46bde8d652mr999291166b.37.1793091351751; Tue, 27 Oct 2026
01:55:51 -0700 (PDT)
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: <20261027065012.191348-1-chunyuzhiqiang@yinhe.ht>
X-Gmail-Original-Message-ID: <CAMZ6RqJwMyaz_qO9grYU6JQcMQEr0vBJUngNHAqBuZP=Apk1nw@mail.gmail.com>
X-Gm-Features: AclHuK_J4bDR70cIab0Sgh5kSlTN88NyIziCXhnpSwYOehbkWFZr8tbpcbD0YAc
X-Cc: netdev-bot+sinfo@kernel.org, netdev@vger.kernel.org,
linux-can@vger.kernel.org, mkl@pengutronix.de, kernel@pengutronix.de,
haibo.chen@oss.nxp.com, shawnguo@kernel.org, imx@lists.linux.dev,
stable@vger.kernel.org