From patchwork Mon Oct 17 19:20:38 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: 3677 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1606082wrs; Mon, 17 Oct 2022 12:22:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vpQMZ0BIYDieB/Hjnd0PD7EJWN4IodF1lFiAvMGpF7HJcA5ma+sX96vNDlbzbM0caKyvC X-Received: by 2002:a63:87c7:0:b0:46b:3cf1:e163 with SMTP id i190-20020a6387c7000000b0046b3cf1e163mr7647817pge.112.1666034565082; Mon, 17 Oct 2022 12:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666034565; cv=none; d=google.com; s=arc-20160816; b=VTt7zApTbrsOTdvdhUKMN5UCcgPtwTe8M/+0n9muUE8IHbJunRwVXE0g8kxBikGZKK hmAp6aE1AzQG5bDDK7nU7shGcqnNFihAMmRV4eGTUVgMvy3NhVoXTDjZ867JszECCdKa +HoqOV3Sfx76B20XVwPzBAx+ojS9ORi0qTvcg2n887X8uaM46Xg9oFSlzfzN7ZrsP6WL e11A9jtCTNcwmDAG7cVOmTdcLrXfQYVb+0+tqyxZk/zVEichNTDklie/vdqvIO/HHrKr 2G8UgTkgDoksoPAFxV8zZOiMBvQuJ+aRIL6sYFphA28c/WELgMRZerqCHfK5k+KFLG3R KXBg== 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=NzB/MUApnKe/BZRhPd4y1V5qhlZrkCsgVkuf/ND3q4/e2ZHpPn91fxQjA3tehItsF3 rA1k1lRQEVbqc5gv053ffl4gTZZAWHtMBEcAgjbwmgz300L6EOql5c6fzDOeWliknbIo KtIRRPgk5xOy+2C4kZrF8El3qzEwtDDA/ChHPd6065OW3BIoAXmF3r6vEfqMlGDdENPE 3LEGHe8yKImLHQjpKpdtyolFMdNcPlYrXcG6IySBphM1R+yZgOf4bxYWSAm75WOsdliK LjezxkwP0yshzofpxzNbCNmGlhNcOAP9Aaq1yuJDCMPCzmc+IL5ToPHzuqz9JisCGdKh NkDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=K5kwEw8R; 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 o8-20020a170902bcc800b00182c510591asi11741563pls.246.2022.10.17.12.22.28; Mon, 17 Oct 2022 12:22:45 -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=K5kwEw8R; 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 S230522AbiJQTVq (ORCPT + 99 others); Mon, 17 Oct 2022 15:21:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbiJQTVB (ORCPT ); Mon, 17 Oct 2022 15:21:01 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 039FE2649C; Mon, 17 Oct 2022 12:20:56 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id C083720FDC2C; Mon, 17 Oct 2022 12:20:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C083720FDC2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1666034455; bh=jONrZhhKFLS3dleWg98wZ6FgVfueM2/7lN9acbPbclk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=K5kwEw8Ru6foSA14eEUinjzwGuhTZnEGe2DBJEjFH+FJsDQc/O/s0JaHiAnL57FcZ rKZQP2fyy85fw9kpuL89esYpWON6ucPWExYDyDjZ9TleKlZ8EQdFMwZfHXgxi5sabA yfdK83HoYwzS0wY4LG34XVcnLGSYlt4Ulqoe3pek= 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 v7 09/12] net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES Date: Mon, 17 Oct 2022 12:20:38 -0700 Message-Id: <1666034441-15424-10-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666034441-15424-1-git-send-email-longli@linuxonhyperv.com> References: <1666034441-15424-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?1746963859663087773?= X-GMAIL-MSGID: =?utf-8?q?1746963859663087773?= 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. */