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 7166B231830; Mon, 2 Jun 2025 14:57:13 +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=1748876233; cv=none; b=qnrZiwPm2n0oPXCclmQBRYuS8S0Gyy+A5U86RTe2ZgJgYNh+yfZDPhtFaQeBxnBxNXK0atToxEYjMGb8bNlMkismdEI+f6hIJXMD4W/tjYfY9DsUnGNpyUTzRmRTPWp2Gr0GPegWIm1cDWPm5lZASUfE5x++cKZ/WnaPaDhbY/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876233; c=relaxed/simple; bh=iV+VSlSoQERwjoIOaoz4x7afoDcstb+3r0WF7yVutwk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c7FGR24uGFNGQITojxfWnSgUdDLhMAKaEcX9Zi2sbU4w4cIYFHyNXzzXdum83z0opB2l6zaVJO2vlwdMDcVu4rUF0wKVhLPMP+WbNv/IAl4e5WQbCH/t7LM9awGXD2u5wL3HtjEBiKaROjIX84m0bbyGjAOR2T7T+kMCrtQ3RRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Mm+kktvn; 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="Mm+kktvn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A600C4CEEB; Mon, 2 Jun 2025 14:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748876233; bh=iV+VSlSoQERwjoIOaoz4x7afoDcstb+3r0WF7yVutwk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mm+kktvn0SnINWxLv/u+8RfAC8opA/S39qDhQPRubMJv7TQA0repfCTJIE/X69hIx bND1RBJtlZKTe3KwqwEUd2aSC3Crks2ivwVoIEO7EUO63tCN17z9hXeRIigBIHw5s3 EOAB7g13kAzbKzbJoEdVwCeYtL7MfhPI3HuoDA6c= 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 5.15 113/207] net/mlx5: Modify LSB bitmask in temperature event to include only the first bit Date: Mon, 2 Jun 2025 15:48:05 +0200 Message-ID: <20250602134303.154428513@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134258.769974467@linuxfoundation.org> References: <20250602134258.769974467@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-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 a1ac3a654962e..080aee3e3f9bb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/events.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c @@ -160,6 +160,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