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 31C821AB6F1; Tue, 30 Sep 2025 14:53:31 +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=1759244012; cv=none; b=r5jguiI+DVTP0cUCnhfC5fZYu/xj/hlcrG2q/P6M+A7lOyIWcyuBY2VL17LJRaMCcdzA7E9VNiBTczpFagn/J454GcVl2IK49mdYS2r5iCxIpqcy75p5ip6JcLXrHDID4BdjBgv80H72RzOIuNINOJIjHrOfDW7q7cg2DIvoPcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759244012; c=relaxed/simple; bh=ARGRUyVyNnc0EgiKYXTVb9m/9rPIgsY1adwEps3e31s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OkKnWbGonzvFqhGKpE48hb5McdsCG8KQBE9QcII8KXN6z2dEqcA3OcRwkn/3Ou/YjFdsILQJ7lYxXC+EU/wdNNdDp00Nt92nLqQOR+5N44Jno8JCdMcOIM1SE3iV4USTWAnd4Gs5SebzoLKxOWWhczQ6nmAs5S3LwLezJmhhYys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zoBQqmn8; 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="zoBQqmn8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 612D5C116B1; Tue, 30 Sep 2025 14:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759244011; bh=ARGRUyVyNnc0EgiKYXTVb9m/9rPIgsY1adwEps3e31s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zoBQqmn84bR5o/TV9a5cGNrE488/bM9G7lxvXmx1wNx+CaFOB12KOy7Gqc/pjCu4A BoE2SetYy9uMFVCYxbqyRtXduqon2EX8TH1eTqExZAYgIHvToxckoVXNlLCOJNCoIq psfvuYlpWsYJjNiciEsL542u/6B/EfzNzAa/Iln8= 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 5.4 63/81] IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions Date: Tue, 30 Sep 2025 16:47:05 +0200 Message-ID: <20250930143822.319494495@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930143819.654157320@linuxfoundation.org> References: <20250930143819.654157320@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 5.4-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 ad8057bfd0c8b..3d7e067fde099 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -245,6 +245,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