]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/irdma: Fix SD index calculation
authorJacob Moroni <jmoroni@google.com>
Tue, 23 Sep 2025 19:08:50 +0000 (19:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:35 +0000 (15:37 -0500)
commitad705e9424e9f64e38bbd931b17cfa084ebd4502
tree99c9fc09c96164ddc2be9af33a090eaf3d4b79ff
parent3bf2fbd8698993ca4852c063180667eef605a2cd
RDMA/irdma: Fix SD index calculation

[ Upstream commit 8d158f47f1f33d8747e80c3afbea5aa337e59d41 ]

In some cases, it is possible for pble_rsrc->next_fpm_addr to be
larger than u32, so remove the u32 cast to avoid unintentional
truncation.

This fixes the following error that can be observed when registering
massive memory regions:

[  447.227494] (NULL ib_device): cqp opcode = 0x1f maj_err_code = 0xffff min_err_code = 0x800c
[  447.227505] (NULL ib_device): [Update PE SDs Cmd Error][op_code=21] status=-5 waiting=1 completion_err=1 maj=0xffff min=0x800c

Fixes: e8c4dbc2fcac ("RDMA/irdma: Add PBLE resource manager")
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Link: https://patch.msgid.link/20250923190850.1022773-1-jmoroni@google.com
Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/irdma/pble.c