From patchwork Fri Nov 4 16:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 1185 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp508297wru; Fri, 4 Nov 2022 09:28:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6z/kVgDWvwIc9BNZb7HD2Jmc6ZzJzpmIq99zDFwOnkbIMsllhW7QDv9qWs4IAbJE2V9nwM X-Received: by 2002:a05:6402:7c4:b0:462:9bc2:d0d0 with SMTP id u4-20020a05640207c400b004629bc2d0d0mr37156470edy.122.1667579338279; Fri, 04 Nov 2022 09:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667579338; cv=none; d=google.com; s=arc-20160816; b=qO9/cc/j12Kq+A/oG6uYGeTTU7RFRE7LLFsnS3AQKKoSL1i0axpvf+/PUYic6x7ir1 ORkUXwJ3W0klCBiZrt4CYNGl/e5bF1UXqXXNHo7EPMh14dtGnVVpeKgt/nDZ81DNgfwo 0QtaH3uGa0POTtDx027v8JvTtjbV4/ibLF22IemADEZnEa49PBPpqN2tq95wXGY9UdTw 5lxxKl2qauKeo5Ja/98luU134kru+VjHnBl2b4YoFmGkxHZF/qUtcp22WnODLf1i0VHo h2Qjn6SwpKcrJ1uD/mP5NkV/AmEPQ23ZjCVOje6T9n1JstMCjCOUjcniGIlwDsmecf9p /h8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IZsEqnAXu9gQqOQyJERHjoCYCRqyRGF/mpU/4y7/K6Y=; b=orIyEOUJgA7RMcXtIYXr5ChnX+9/krzR8mRbAZnIqtuSRguH9TlZsHHhEpOohP8m9D j93MtleKFZgEZsnsC71tWYHB2Fwc7nFIwldIX1wAKCYfc7VHvsjSREguAlZacZ4rI0up yTJuG//hBb7pv5qUU9pFoUUE/rYpQA8M6ot+wr/x49+tKZlueSs7UnLX8eBjpsHWvjg3 gLbVMGdMfrmSXAIlVQTaGEbaMMEEAkZr9WqavAuR+ZdGdP+pN7BKjyEVmf/9FMeoRkb4 oL++XrQUFq5twZjuv/4up5KWFyEhuZzwMw7ZfQv9p8Iape+LoGv5d+V388epxfq7653r tI5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=brp4z63F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b0076f0940cb28si3873695ejt.175.2022.11.04.09.28.33; Fri, 04 Nov 2022 09:28:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=brp4z63F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbiKDQ1x (ORCPT + 99 others); Fri, 4 Nov 2022 12:27:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbiKDQ1p (ORCPT ); Fri, 4 Nov 2022 12:27:45 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F7D4AF05 for ; Fri, 4 Nov 2022 09:27:42 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id c15so3322479qtw.8 for ; Fri, 04 Nov 2022 09:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=IZsEqnAXu9gQqOQyJERHjoCYCRqyRGF/mpU/4y7/K6Y=; b=brp4z63Fqa8k4DJrsrSiKV6m2DIg2+Y/XbUhlIHzq8eNeguyUYOoOzHrMn8cAYrn3F Ka6jQ0Q5eSI/n8WTEsLbKkN8wyQuxWIE17R1piVemcT6LYnnnTxVajPF3Cl/R2jp2YOL J41LyvPArJxKMYN0hwPIuZlKUh/+ssfwvnlEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IZsEqnAXu9gQqOQyJERHjoCYCRqyRGF/mpU/4y7/K6Y=; b=J+p88h0ZhNGUHFi1KMnxeFT7Xu2dBfJB6gUce9lmxlonxfqeESzltXpyFiUv1b6pp+ t9wTCAer+m/zo25CACcWziaX+xQBFcrk0IutIulVddePAAGBZLYxnZI8jkfCx6o0uNi1 zXEtzXu6ifLp20JroIdzv2Pe5/SrVJ1Bu8AV9rgqow5aSMkahiAZo4V7qS62rdqlCB9n fo6+nhbA3WlSQ+V35iZQPql9iUckqxqaUyvqtuUwwRgw2ydZdQ1ZWXyqNKc6i7Dq+zs8 o/kirISCHWKwSAYsigSfZdaCJCpx9IQy0L88KsuobCwf+bXp/TOvqh7cig6UADUhRhB7 bnjQ== X-Gm-Message-State: ACrzQf2hzxzSXEHZinriFcIqWs/V1cNsz9DrFvIo8seph8NN8sOTv9Hn OtR6IxDXVatk3h2nhP0J3Gek2zpv4nlYDA== X-Received: by 2002:ac8:44d0:0:b0:3a5:3623:c0e with SMTP id b16-20020ac844d0000000b003a536230c0emr18126158qto.251.1667579261189; Fri, 04 Nov 2022 09:27:41 -0700 (PDT) Received: from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x17-20020a05620a449100b006fa31bf2f3dsm3290395qkp.47.2022.11.04.09.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 09:27:38 -0700 (PDT) From: Ajit Khaparde To: ajit.khaparde@broadcom.com Cc: andrew.gospodarek@broadcom.com, davem@davemloft.net, edumazet@google.com, jgg@ziepe.ca, kuba@kernel.org, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, michael.chan@broadcom.com, netdev@vger.kernel.org, pabeni@redhat.com, selvin.xavier@broadcom.com Subject: [PATCH v3 0/6] Add Auxiliary driver support Date: Fri, 4 Nov 2022 09:27:27 -0700 Message-Id: <20221104162733.73345-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SORTED_RECIPS,SPF_HELO_NONE,SPF_NONE autolearn=no 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748583672399629665?= X-GMAIL-MSGID: =?utf-8?q?1748583672399629665?= Add auxiliary device driver for Broadcom devices. The bnxt_en driver will register and initialize an aux device if RDMA is enabled in the underlying device. The bnxt_re driver will then probe and initialize the RoCE interfaces with the infiniband stack. v1->v2: - Incorporated review comments including usage of ulp_id & complex function indirections. - Used function calls provided by the auxiliary bus interface instead of proprietary calls. - Refactor code to remove ROCE driver's access to bnxt structure. v2->v3: - Addressed review comments including cleanup of some unnecessary wrappers - Fixed warnings seen during cross compilation Please apply. Thanks. Ajit Khaparde (5): bnxt_en: Add auxiliary driver support RDMA/bnxt_re: Use auxiliary driver interface bnxt_en: Remove usage of ulp_id bnxt_en: Use direct API instead of indirection bnxt_en: Use auxiliary bus calls over proprietary calls Hongguang Gao (1): bnxt_en: Remove struct bnxt access from RoCE driver drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +- drivers/infiniband/hw/bnxt_re/main.c | 578 +++++++----------- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 8 + drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 399 ++++++------ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 49 +- 6 files changed, 480 insertions(+), 573 deletions(-)