linux-yocto/drivers/infiniband
Or Har-Toov 8634e8eb12 IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions
[ Upstream commit 85fe9f565d2d5af95ac2bbaa5082b8ce62b039f5 ]

Fix a bug where the driver's event subscription logic for SRQ-related
events incorrectly sets obj_type for RMP objects.

When subscribing to SRQ events, get_legacy_obj_type() did not handle
the MLX5_CMD_OP_CREATE_RMP case, which caused obj_type to be 0
(default).
This led to a mismatch between the obj_type used during subscription
(0) and the value used during notification (1, taken from the event's
type field). As a result, event mapping for SRQ objects could fail and
event notification would not be delivered correctly.

This fix adds handling for MLX5_CMD_OP_CREATE_RMP in get_legacy_obj_type,
returning MLX5_EVENT_QUEUE_TYPE_RQ so obj_type is consistent between
subscription and notification.

Fixes: 7597385371 ("IB/mlx5: Enable subscription for device events over DEVX")
Link: https://patch.msgid.link/r/8f1048e3fdd1fde6b90607ce0ed251afaf8a148c.1755088962.git.leon@kernel.org
Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Reviewed-by: Edward Srouji <edwards@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-02 13:40:37 +02:00
..
core RDMA/core: reduce stack using in nldev_stat_get_doit() 2025-08-28 16:26:00 +02:00
hw IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions 2025-10-02 13:40:37 +02:00
sw RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug 2025-05-22 14:10:01 +02:00
ulp RDMA/srp: Fix error handling in srp_add_port 2025-02-21 13:49:12 +01:00
Kconfig
Makefile