Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp198725rdf; Mon, 20 Nov 2023 23:08:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP13g/awEFKg/2yhWv3+MknMbPUioW/odb0IcH6UJLoZ6kvwSStKvCz1LeIi+s2DW7uZ1x X-Received: by 2002:a05:6808:278e:b0:3b2:e6b5:e99 with SMTP id es14-20020a056808278e00b003b2e6b50e99mr9369408oib.52.1700550516165; Mon, 20 Nov 2023 23:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700550516; cv=none; d=google.com; s=arc-20160816; b=FKOnjDUNWm33202djZdS4xsriUdBeOWCZuX+VUP5Jj1y3LxFGeY/SduExkgcSaUwxJ mYJG1dp/ZJ4uHXqpm8x3+eEMXo1pEsPeaUSrMzDT8YYS/WET9TR6btAAKl6TwRWrhzMo PlHBi1fq7cZrWsc0vycl29nFA80H/WeUYTNawY96Yf5Vc9l8ZsZz6wjvxfAevgfuaQk3 ejzVvQpggpT7piyZKTwjiLM8vEd6Eq+2/GNucZo11Mw3OE9TgZrn0a6hSRdYCNW5xhUm BmTK2DfXvrqU3k8rh3CpP8v9pJRiT7UnNhFySH9HjLC8Qb/OZz2C1609CBE4fEeRWexi m5VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u1g/Wx6GaThkltrOG+lJw94k90XjWcLjYnwHLVdxlnw=; fh=X0hOMbpOU1raqJinhHHPFdyR1sBFq2lMGBVOqO0x1pk=; b=zqbIYYkQUV25UpvQVUsoaCCtvvYV7tuwpE3DK485PW9wjAvH8+ot7mcGxefFQH9D1J TYbioQ2thpS1GP2mat4VaTAY0XV3lsA14sCoj2mAJRXmaApyhMYaLZI3BxGcycOMC0Qw nIBNseCfVlV5VTfKsdXIzIEuY5NGkwCMU+vMNyCQJRHsA411ygRayU5QH6FZQDCQfOx+ OJ8CxY6izyobl/LX9wnbppOzRhcWj/Q2rpZp5OVyi4DWbvOObf7GTDCUJwMHEdoXyEAr 2put9tLx78cusboiVLuXif63YdUVb3m2jwnJIHFDnBZklnM1tTru6UVw+o7V2ok6yfH4 VQBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DoxnnLt2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w9-20020a631609000000b005a9fde46fa0si9493125pgl.130.2023.11.20.23.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:08:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DoxnnLt2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2ED6980DECCF; Mon, 20 Nov 2023 23:06:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbjKUHGe (ORCPT + 99 others); Tue, 21 Nov 2023 02:06:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjKUHGb (ORCPT ); Tue, 21 Nov 2023 02:06:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE203F5 for ; Mon, 20 Nov 2023 23:06:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F2DFC433C8; Tue, 21 Nov 2023 07:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700550387; bh=fRBJjZFPTR6OGb7k2gGjja7sHzz884j46t7cYBYv3r8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DoxnnLt2h5sAHOExSrhg3cR5/5BXtrkiCv0ZiwrqokF+RY1/ZVSCXFSXEipTWeVDU CAReITvBovf9yexbC2/k6T/KVelOR2M4ZBunk3OWncJsqOUYMbHJSM1mUS17xGBsVC XzsUsT7eqkbSj935jcVGBo5T4i4r9r5tTqtxaVsQRCwZi1GvD+ZuEaqqLgx6vnyaO1 dGcdw8jho1cA589iON0MXnXHMVP6hn3nLFn//ASvI7T3w7KToSi3AbT6a8XSR2qFFE HucyxZECGiG1SI2F97NjolLsj192AOtolxBv3kB4hQJhZ0iHLoaArh7R5aDVEmqIz/ AyOP/+R8a1Ngw== From: Saeed Mahameed To: Arnd Bergmann , Greg Kroah-Hartman Cc: Jason Gunthorpe , Leon Romanovsky , Jiri Pirko , Leonid Bloch , Itay Avraham , Jakub Kicinski , linux-kernel@vger.kernel.org, Saeed Mahameed Subject: [PATCH V3 1/5] mlx5: Add aux dev for ctl interface Date: Mon, 20 Nov 2023 23:06:15 -0800 Message-ID: <20231121070619.9836-2-saeed@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231121070619.9836-1-saeed@kernel.org> References: <20231121070619.9836-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 23:06:48 -0800 (PST) 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.42.0