]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: Clear Read-Only port buffer size in PBMC before update
authorAlexei Lazar <alazar@nvidia.com>
Wed, 23 Jul 2025 07:44:30 +0000 (10:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:50 +0000 (12:08 +0200)
commit4d81205d27c33c251a1d9fee6ea5c4d53af97042
tree87af5f220e5c8c932c53347cab187e1b1d30ebe9
parent58004aa21e79addaf41667bfe65e93ec51653f18
net/mlx5e: Clear Read-Only port buffer size in PBMC before update

[ Upstream commit fd4b97246a23c1149479b88490946bcfbd28de63 ]

When updating the PBMC register, we read its current value,
modify desired fields, then write it back.

The port_buffer_size field within PBMC is Read-Only (RO).
If this RO field contains a non-zero value when read,
attempting to write it back will cause the entire PBMC
register update to fail.

This commit ensures port_buffer_size is explicitly cleared
to zero after reading the PBMC register but before writing
back the modified value.
This allows updates to other fields in the PBMC register to succeed.

Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Yael Chemla <ychemla@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1753256672-337784-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c