Article View: linux.kernel.netdev
Article #3383[PATCH net-next v4 0/6] eth: fbnic: expand hwmon sensor support
From: Zinc Lim
Date: Wed, 14 Oct 2026 22:22
Date: Wed, 14 Oct 2026 22:22
66 lines
10968 bytes
10968 bytes
The firmware capability response carries per-board sensor thresholds,
and the firmware reports which range a sensor has entered whenever it
crosses one of them. This series surfaces both to userspace:
- Move the sensor read logic out of fbnic_mac, closer to its only
caller in the hwmon code, and drop the now-unused get_sensor op.
- Cache the temperature and voltage readings for the current jiffy so
a burst of attribute reads issues a single firmware round-trip.
- Parse and expose the temperature (min/max/crit) and voltage
(min/max) thresholds. Thresholds the firmware does not report are
not exposed.
- Parse the range firmware reports, both in the unsolicited threshold
event and in the sensor read response, and cache it per sensor.
- Expose temp1_alarm and in0_alarm from that cached range, and notify
on each crossing through hwmon_notify_event().
- Derive the range from the reading carried with the event, on old
firmware that predates range reporting.
Changes from v3:
- Moved cache seeding to fbnic_mbx_init() in patch 2, so it also runs
on resume and AER recovery paths rather than only on probe.
- Dropped previous patch exposing all hwmon attributes unconditionally as
read-only. Thresholds the firmware does not report are now not visible
in sysfs.
- Collapsed the five per-threshold alarm attributes
(temp1_{min,max,crit}_alarm, in0_{min,max}_alarm) into one alarm per
sensor, temp1_alarm and in0_alarm. Firmware reports which range a
sensor is in rather than per-limit flags, so a single attribute
matches what the hardware reports.
- That alarm now comes from the reported range rather than from a
driver-side comparison of a live reading against the thresholds.
- Split the alarm work into two: patch 4 parses and caches the range,
from both the unsolicited event and the sensor read response, and
patch 5 exposes the attributes and notifies on each crossing. The
previous "firmware notifies hwmon on sensor threshold events" patch 6
is now folded into those.
- Added patch 6 for firmware that predates range reporting, which
flags only that a limit was exceeded.
Changes from v2:
- Addressed Jakub's patch 3 feedback on jiffy comparison when
checking cache validity.
Changes from v1:
- Addressed Jakub's patch 6 feedback on including a
if (!IS_REACHABLE(CONFIG_HWMON)) return; guard.
Zinc Lim (6):
eth: fbnic: move sensor read logic out of fbnic_mac
eth: fbnic: cache hwmon sensor readings
eth: fbnic: report temperature and voltage thresholds via hwmon
eth: fbnic: parse the alarm range reported by firmware
eth: fbnic: report temperature and voltage alarms via hwmon
eth: fbnic: derive the alarm range on older firmware
drivers/net/ethernet/meta/fbnic/fbnic.h | 11 +
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 140 +++++++-
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 44 +++
drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c | 332 ++++++++++++++++--
drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 55 ---
drivers/net/ethernet/meta/fbnic/fbnic_mac.h | 2 -
6 files changed, 500 insertions(+), 84 deletions(-)
--
2.53.0-Meta
Technical Details
Message-ID:
<20261014222225.2803660-1-limzhineng2@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-346461-linux-kernel-netdev=dewy.ruShow 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-346461-linux-kernel-netdev=dewy.ru
From: limzhineng2@gmail.com (Zinc Lim)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 0/6] eth: fbnic: expand hwmon sensor support
Date: Wed, 14 Oct 2026 15:22:18 -0700
Organization: Usenet Network
Message-ID: <20261014222225.2803660-1-limzhineng2@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2401244"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ZUdG1Nrkb1WmLZFHfuJiAVGDQLk= sha256:3Ao4SJdPp3rrxJ51so5TbMV+kBCDeweceIsH0PK9aXU=
sha1:zskSl0OiPr+b8/XZl1YunetrACk= sha256:HoGWHmg/hbGunZERc83Gq0AVhTl9TbhZrMrhqrLl/yw=
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 2C1971101F6; Thu, 15 Oct 2026 01:29:00 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.748
X-Spam-Status: No, score=-0.748 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, 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=gmail.com
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 jQA2L9I1smci;
Thu, 15 Oct 2026 01:28:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346461-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 7B918110165; Thu, 15 Oct 2026 01:28:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 3A7C73C5E5; Wed, 14 Oct 2026 22:22:34 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B78884AAC63;
Wed, 14 Oct 2026 22:22:32 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UUjUgw7r"
X-Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABF9C4A260F
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 22:22:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1792016552; cv=none; b=SjC9Tl9cqYP34Tn2cu8TpGYwQsSWEwjZsfkXvIJIeHCOnvtXNVId7kz0+xOtj0L3tAuxRmEbIqTdwBf+tSUQQfvHNLl0PxXFGroA35XNmZJlqZde9yovlAVzy6yxPO/aBwss1KnJdz4dsXG56Yg883qs17amZ4jtZ2qbmMIj7Rs=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1792016552; c=relaxed/simple;
bh=xFEmAAT49vOrGlbwyZJCJpFg7gwDK6WlTjnMnrxO8bw=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sjYd0tb3Ps3Bg6JbLUH2AbjL1ASGNLxmpd145LPQ4tNSQ0t63Zl2XvHgt8f6hHy78cXMLw0PXYfwNEH7gYa1XG3eh3ShyYSFEJwpFQbkkuhKItAnA2E47x/zZunhI7dFI8G6tmGnLKLDtpYJ3oXdQAnkIamV6u4fLGXU3FrSwbk=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UUjUgw7r; arc=none smtp.client-ip=74.125.82.170
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-33bf40b0c8bso2156504eec.0
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 15:22:30 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792016550; x=1792621350; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=2b7f1ifOYnCy9LytpiVooR3kRz3vXe1JYmZB2bLzwcY=;
b=UUjUgw7rcVdbgL1OES4tTklOrZBQSJKt4SIH6hfwZ2AV9afaf1nG/XNywi6iVdrOLw
oTuMEaw+YfXcDoVoPAtX/D1iEr7BQ8I2JreFByfSpFj4mYZX4C/U2XzRvedNvZaGt9/j
OUcUEXo9xhXWM3c3l8cFbJ5YkmugLcJE47UM7ngENVXmB9AXrB7zltVZcz9tttA+awgj
3zejwZGyY8jIGh46LwQr9PgapKLf24nwqfifL+/43Plwkrg7E4rfi944gMTCc2GqP2f8
T5mifXZbdyP62krikIUEvoboEYGuyVdswrvqZ+ROL+JoHy1z1PhSSRy6e2/N08j4AfVe
u+Yw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792016550; x=1792621350;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=2b7f1ifOYnCy9LytpiVooR3kRz3vXe1JYmZB2bLzwcY=;
b=rjVBqLh7oDi3rUsWx5Jq1/byHWkl5aPvKYTnsdlmxRuThSiZWIXidCiNquIhD5Of3Y
xldbnyoQkdB0sxukY8BE8A8/4fZ8tHfo6A/qMO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ee46e88-3537e01e8b6mr25315973eec.12.1792016549619;
Wed, 14 Oct 2026 15:22:29 -0700 (PDT)
X-Received: from localhost ([2620:10d:c090:500::5:7561])
by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3537ca6d202sm54635124eec.13.2026.10.14.15.22.29
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 14 Oct 2026 15:22:29 -0700 (PDT)
X-Cc: kernel-team@meta.com,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org,
zinclim@meta.com,
limzhineng2@gmail.com
X-Mailer: git-send-email 2.53.0
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>