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 F33213C465; Tue, 30 Sep 2025 15:26:55 +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=1759246016; cv=none; b=pXeZQVbVbMUqmJS2gvX7DIl8cj96MtkNncW2EA3bcC4B0aR2IbBYhbb9RuCVNee2GzQijQo4RMgkE8LfsBNJ5V69CIe5CAX5ifHl61eRgVO8nXZU47OKjP1XxlCEutoaaNRrSBoiOJdQcu+QDgCGU4XyhG7f8jJDO9QGSTLAp3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759246016; c=relaxed/simple; bh=gEAHSWwVS6O9iR2D7GuNjgMEzZKWi6p0OGcaDo7Kcug=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n6MMbyZgxlj74R9AwSqQsH+X/pflJP3lbADsSglkD/pxQeKBoLFGW/uOO6XQvjvBkPy/l6lGDPPWv6bkAa88fXfb+4fVg1gBBnhgYcFXCxWSNbpP8cFAn9vfoZwe0gHLAuBwKjHitajyl5/g80BrqlFs/s8TcyoNDiPkRravUuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i++rZUzW; 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="i++rZUzW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 237B7C4CEF0; Tue, 30 Sep 2025 15:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759246015; bh=gEAHSWwVS6O9iR2D7GuNjgMEzZKWi6p0OGcaDo7Kcug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i++rZUzWEaBlc/vvPmNKJOxUI9uXu2v0n+L3Nk3PHCaNk2Mt/tSlH5wK6FHgxfR8t SQhKovo9x5w4DG9gsYVoIRexE7jsGwNi6b2SElGvSFbuiEdWRJLYSDMG3CePyg0+IE xAsw+PxwLjm66MOl9rA7hhQlvt9P+VL6sVHq15DY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Or Har-Toov , Edward Srouji , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 6.12 26/89] IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions Date: Tue, 30 Sep 2025 16:47:40 +0200 Message-ID: <20250930143822.987666269@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930143821.852512002@linuxfoundation.org> References: <20250930143821.852512002@linuxfoundation.org> User-Agent: quilt/0.69 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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Or Har-Toov [ 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: 759738537142 ("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 Reviewed-by: Edward Srouji Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/devx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c index f49f78b69ab9c..e74273bc078be 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -191,6 +191,7 @@ static u16 get_legacy_obj_type(u16 opcode) { switch (opcode) { case MLX5_CMD_OP_CREATE_RQ: + case MLX5_CMD_OP_CREATE_RMP: return MLX5_EVENT_QUEUE_TYPE_RQ; case MLX5_CMD_OP_CREATE_QP: return MLX5_EVENT_QUEUE_TYPE_QP; -- 2.51.0