From patchwork Sat Oct 22 00:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: longli@linuxonhyperv.com X-Patchwork-Id: 7040 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp960975wrr; Fri, 21 Oct 2022 17:06:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Sxv3uMWhIQVptenNpno/Ifwd8RxAtZjz0j8zLA1H3x+APXmq9CBAWT+MHr3FcbAKcJ7Tj X-Received: by 2002:aa7:c981:0:b0:461:522c:ce0d with SMTP id c1-20020aa7c981000000b00461522cce0dmr4324552edt.169.1666397176560; Fri, 21 Oct 2022 17:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666397176; cv=none; d=google.com; s=arc-20160816; b=bRH4Qv/nbwtXvsNuH5wpLD3DKsO08bUsNTv55EC6fkP5KHvB9pq9lFmbc3xvchQ6Jc bNTLJNhXa9U1r9cxehMw0Ftf8oeCrDg1HZFB3eScnVs9ostvB+aG1O9Rznl/OxoxEI7Y I/QF4yCF5cerJhPmrl+pTjdx4vWzPuVxC2h/pgSL2i6DeuJOO6daKpTjw0ZjIiL9JQMR z+jCELfNyT4U1RwVj4BAg/2HIgYGHSeGV4DrW8k30dKcZ++jQzALIjxaFF6Go2NJ1WPi WV7jPnOlgpm3dfQrFG1SHA4lo6e4X4lxjlN7HzoLGnmkjJ4kMC3k6SwJEB1W5c+nDh6I XIJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=jONrZhhKFLS3dleWg98wZ6FgVfueM2/7lN9acbPbclk=; b=Z68dnMujtAkMUyBEP9yDqkEmL+qbn5iKbZs8f2fIm0RL6cl0S5ZqUi81w4/Y1PoadK xaZ59cgZzzK03jt8h+K9EIkEBQrcofpIiBa6lBWq42f+bIwJxi5p+3fjRVtt0gZi0Uir /PGd+hdRKT8TVpm8km2LP/EIbHgktc1PoH2eZL8PqjNH2ynppO3HU/iGyNelcOdQ3pMy AaWjdoNqwbPV6iH/0T16d0Mdr8PwDrm1zCKOR1GUOJH7wWeiubt+GlXGc8+CuXfkhZ4y PBRD3Ji65WSrEDx3JZxFsQ0ShjTswrlm4YWguJrz6DQi9fh1LKZOou5Dos3m3x6xSywl H2vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=eybYVpy7; 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=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170906678a00b0078da83673a3si18451370ejp.138.2022.10.21.17.05.52; Fri, 21 Oct 2022 17:06:16 -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=@linuxonhyperv.com header.s=default header.b=eybYVpy7; 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=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbiJVAC2 (ORCPT + 99 others); Fri, 21 Oct 2022 20:02:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbiJVABs (ORCPT ); Fri, 21 Oct 2022 20:01:48 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43DC426CDCC; Fri, 21 Oct 2022 17:01:43 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id 6A75120FF4E8; Fri, 21 Oct 2022 17:01:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6A75120FF4E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1666396901; bh=jONrZhhKFLS3dleWg98wZ6FgVfueM2/7lN9acbPbclk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=eybYVpy7LQEeNtEwDUp3+xt2NwD/jxXDevZPUdORbKEjVMmzxwDzaYKRVURVqeIpd mgjIT4Gdf1DloIwhJp5A8xgWY0EwE8nW/+KNw9gShNHeJzRo3mWYZJXhuNcbs8mgKI B9pRn7Y03pXcZptIKAY7ZHKfBPkk1UVT4nQ09oBU= From: longli@linuxonhyperv.com To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jason Gunthorpe , Leon Romanovsky , edumazet@google.com, shiraz.saleem@intel.com, Ajay Sharma Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Long Li Subject: [Patch v9 09/12] net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES Date: Fri, 21 Oct 2022 17:01:26 -0700 Message-Id: <1666396889-31288-10-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666396889-31288-1-git-send-email-longli@linuxonhyperv.com> References: <1666396889-31288-1-git-send-email-longli@linuxonhyperv.com> Reply-To: longli@microsoft.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_SPF_WL 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747344086035533088?= X-GMAIL-MSGID: =?utf-8?q?1747344086035533088?= From: Ajay Sharma When doing memory registration, the PF may respond with GDMA_STATUS_MORE_ENTRIES to indicate a follow request is needed. This is not an error and should be processed as expected. Signed-off-by: Ajay Sharma Reviewed-by: Dexuan Cui Signed-off-by: Long Li Acked-by: Haiyang Zhang --- drivers/net/ethernet/microsoft/mana/hw_channel.c | 2 +- include/net/mana/gdma.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c index 76829ab43d40..9d1507eba5b9 100644 --- a/drivers/net/ethernet/microsoft/mana/hw_channel.c +++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c @@ -836,7 +836,7 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len, goto out; } - if (ctx->status_code) { + if (ctx->status_code && ctx->status_code != GDMA_STATUS_MORE_ENTRIES) { dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n", ctx->status_code); err = -EPROTO; diff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h index 0b0c0cd0b6bd..a9b7930dfbf8 100644 --- a/include/net/mana/gdma.h +++ b/include/net/mana/gdma.h @@ -9,6 +9,8 @@ #include "shm_channel.h" +#define GDMA_STATUS_MORE_ENTRIES 0x00000105 + /* Structures labeled with "HW DATA" are exchanged with the hardware. All of * them are naturally aligned and hence don't need __packed. */