Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp140253rdh; Tue, 6 Feb 2024 23:28:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IERQ4jFoOSHEOS/+Fh+DApcMyHia+v+UEWJvUsi2y4xVQGwcXOi/7ID6mmvUHMOPpNtrMNC X-Received: by 2002:a05:620a:94a:b0:785:9976:fd5f with SMTP id w10-20020a05620a094a00b007859976fd5fmr1559872qkw.19.1707290914316; Tue, 06 Feb 2024 23:28:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707290914; cv=pass; d=google.com; s=arc-20160816; b=Gpo6fs/phv4r8g3sqwa4xW7oEci/qzXnE2VzyxK36xjbhWB1hcq4G3IKWbxjJ/rGVW /uW4ayacyPB6FArG+Od6p9DCrLZ5CTRXtcv44iJJ/L23O1Q5xw6BJZY/KZBpuXQgiwFk LPnZr0tUa6FiI5MZDgACtmX4ei/H30W5jqmKMnyRdQ/Dq6Bnsylsr/Hcr5agy7QptKac x6T6cnoFhM/t4vXZQTGOhycX/rf/Y3Ei5Zag+9B4+c7+BHf9uhkU5bnf9nH5AVkxhHiv VRRy3crwcF0HjkbT3X8EfGoVZY0Y90Zc/fvhV6UaX5UT2nkXcNxCNFtOrXutD336Bzce /2pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XLot7mTyGhFw+GmvCLq7oj9AS61JB1sIxUgjAWaai9s=; fh=+q5+YGSUJ+rmxD2pFbGc1qH8Ac+xF8EwJ31yhwMl7ck=; b=Hs1yEGYHCBQiWl5KmB6PeFIvwcYuEgHWH1CrviYIobAUAG3xV41WodyX1Ip11572mZ SbU1VKBjBmSKjpZIkEGwt2Sq8c/SoqksMOd+fXw3cRRoDscxTrIoPtmP3jAts3Ed+qIL SuFPkoYOoims1rzX2tZhJiMTYoEvlkjvrmDK1sWS88mt+pmS2Ei3hk3w9NlXGphkWUvP NPEy6F8MOnapx2/FpTg5I3imF6uIU+Stok+2Nb1kwGbSPpez4DAOFR+KDQn0hGQJWS0u jxMSAaSvTMsfupGbOt3CPDz8dQlDnnb6X6KNwHz/2rpPOBvLk2DWIZymyX3/HjjNq+Y9 tBIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JtZEUOh0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUXzFuXav+IktOMJWILpNnTCHXmYWxRKE3dq7lEDK5l+HgchAcsAPEeZVLa+IYh5+2YhXHEaIuz0agxYhovVlP1ycJhi937trW0+dHgrw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i15-20020a05620a144f00b0078562f9f819si606658qkl.23.2024.02.06.23.28.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 23:28:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JtZEUOh0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B97C31C232C7 for ; Wed, 7 Feb 2024 07:28:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A02A200AD; Wed, 7 Feb 2024 07:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JtZEUOh0" 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 8DFA21F953 for ; Wed, 7 Feb 2024 07:28:25 +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=1707290905; cv=none; b=ITK3nmmicoPBL86jVBP+ZUOZ+v/xdklDsNCSrISWk3j21Yw8XzKIaJopxIQd01TAg1yp+cl6ls6ZOARg/0a4Y14UVYuutyx59byHcgR8wukc/VnHb+HEnKxri3+3Mv+70T9PZCoPOyQOfWqYc9gf9iEnqLKJ3RodZF0brxmlXMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707290905; c=relaxed/simple; bh=BaBHHsLR+o2kRrQL4hy2Xypz7kcRhGFamMXsbhKvWuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kmW5w3TxQbrEvLZGtIIDWd5E3+7QsWvEnjMc0ahJWHfQl2COW7LTI+FKxSoJBGEkYNuqKABdHEqbwQOvlijJPONa5v6WPp26sYf8UVtK4jKP5pMwnGcPv1XRgNWYTueVGVKrqFGQWEDcraAJA01YY93U+Ii6D/NYgC7de9qdrW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JtZEUOh0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5C81C433F1; Wed, 7 Feb 2024 07:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707290905; bh=BaBHHsLR+o2kRrQL4hy2Xypz7kcRhGFamMXsbhKvWuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JtZEUOh0zRyxwwk34XIHx6A3v4f86vUzDdohVwqDarRmZ/nvXulBxuTQvTLAZ1vaG VjAHHJ6Cokwkisng7pRIgUVIwIVE8H+8mcUrdOSAe6MQtzwbhHEo2cqMEmZ/Ji5Nlp yyCsglY+/e1OChNvvsDKK2/1PBXOncxfW1FuMd7uFgqgQ4/UimYP9qNAVXko+j4g0p MwPK1ySscNrlm0BKysPlOnOcJ9j7doblgAsrYoUNu1XBM90JFTW9Q9jXx6QakIqUMU yB0bfZwmt/vRgktKMNCBwr3sHV02XK6Fa4UU2gPZ5Pav2MvtIY4SEvQyVHxYDgMSwH RkDBRtPh2GgGg== From: Saeed Mahameed To: Arnd Bergmann , Greg Kroah-Hartman Cc: Leon Romanovsky , Jason Gunthorpe , Jiri Pirko , Leonid Bloch , Itay Avraham , Jakub Kicinski , Saeed Mahameed , David Ahern , Aron Silverton , Christoph Hellwig , andrew.gospodarek@broadcom.com, linux-kernel@vger.kernel.org Subject: [PATCH V4 1/5] mlx5: Add aux dev for ctl interface Date: Tue, 6 Feb 2024 23:24:31 -0800 Message-ID: <20240207072435.14182-2-saeed@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207072435.14182-1-saeed@kernel.org> References: <20240207072435.14182-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Saeed Mahameed Allow ctl protocol interface auxiliary driver in mlx5. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c index cf0477f53dc4..753c11f7050d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c @@ -228,8 +228,14 @@ enum { MLX5_INTERFACE_PROTOCOL_VNET, MLX5_INTERFACE_PROTOCOL_DPLL, + MLX5_INTERFACE_PROTOCOL_CTL, }; +static bool is_ctl_supported(struct mlx5_core_dev *dev) +{ + return MLX5_CAP_GEN(dev, uctx_cap); +} + static const struct mlx5_adev_device { const char *suffix; bool (*is_supported)(struct mlx5_core_dev *dev); @@ -252,6 +258,8 @@ static const struct mlx5_adev_device { .is_supported = &is_mp_supported }, [MLX5_INTERFACE_PROTOCOL_DPLL] = { .suffix = "dpll", .is_supported = &is_dpll_supported }, + [MLX5_INTERFACE_PROTOCOL_CTL] = { .suffix = "ctl", + .is_supported = &is_ctl_supported }, }; int mlx5_adev_idx_alloc(void) -- 2.43.0