From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CBB1127F16D; Tue, 27 May 2025 17:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367579; cv=none; b=C4EHy7SFoeqqN9UHgqcvvqimWUhfCybzjmnHw8/akWP9pz1wCOfHRYKYO0451J+4WtX6T1Md/1SWcnIxg57vNWCHvr8gOGrVFvBsA1Gk7A+wB/S8Ch7kMK6NUsXUqgRn7Htp/krai7tLS2eLQnw2R+Gq40Bi0eX6BmKXaMnkko8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367579; c=relaxed/simple; bh=NQXCATAKY8HFzcsgt/1s2zfoD5q+4RJIVwoTgFeKNtI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AklwKo44fZGS6CnjzEaztHO4em+M4lrPvrjH6M89G1AwbPM5Zadyz3k4LTLDdsr7QNXXJ21E+Alc/OCtPmS9JehI35J2Z/GFdH5zea5j3lFGEVMY0xeAiElsw7shI/RhsgH6XQ7GwBOrVXiuq5IVSWn4RpsTGQ1XBoe/iZMjul8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MIyeIghx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MIyeIghx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50EE6C4CEE9; Tue, 27 May 2025 17:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748367579; bh=NQXCATAKY8HFzcsgt/1s2zfoD5q+4RJIVwoTgFeKNtI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MIyeIghx/xkdwxK8RO2/imQchyZ2sTKiDOYzYEi6wG13eF3ePsnqHmcN8gyuGdmay aGB1EbMju7xLQxkrnn2ujXmmBmvmCsH1O29gEVy/tknYhemhLqh4x8yVZKK7cDUDfa UHJ+aR3xQfMRBGwXytrAx0tDFN8uu4GDSZhve9dc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Shahar Shitrit , Tariq Toukan , Mateusz Polchlopek , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.14 432/783] net/mlx5: Modify LSB bitmask in temperature event to include only the first bit Date: Tue, 27 May 2025 18:23:49 +0200 Message-ID: <20250527162530.717139540@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shahar Shitrit [ Upstream commit 633f16d7e07c129a36b882c05379e01ce5bdb542 ] In the sensor_count field of the MTEWE register, bits 1-62 are supported only for unmanaged switches, not for NICs, and bit 63 is reserved for internal use. To prevent confusing output that may include set bits that are not relevant to NIC sensors, we update the bitmask to retain only the first bit, which corresponds to the sensor ASIC. Signed-off-by: Shahar Shitrit Signed-off-by: Tariq Toukan Reviewed-by: Mateusz Polchlopek Link: https://patch.msgid.link/20250213094641.226501-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/events.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c index d91ea53eb394d..cd8d107f7d9e3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/events.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c @@ -163,6 +163,10 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data) u64 value_msb; value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb); + /* bit 1-63 are not supported for NICs, + * hence read only bit 0 (asic) from lsb. + */ + value_lsb &= 0x1; value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb); mlx5_core_warn(events->dev, -- 2.39.5