From patchwork Thu Nov 3 19:16:27 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: 15118 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp721210wru; Thu, 3 Nov 2022 12:20:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YjwcQt6KjKbhW7uaCzVEzAuddgIcK97bf/2lkD9LekF5E9J/dpu0694PuVJDMfVy3Qg0q X-Received: by 2002:a17:906:9b8e:b0:791:8f57:6845 with SMTP id dd14-20020a1709069b8e00b007918f576845mr31463719ejc.174.1667503229018; Thu, 03 Nov 2022 12:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667503229; cv=none; d=google.com; s=arc-20160816; b=bLn536/Lg2b+Ps7OdvawpIJxOSVJH8fcMm0UWVMyYBqMcMwD7wMXxZlWdqe3I82Wf9 4jBlJKebCsa8rXdwJ4sRpECmUM9D75VItMlMKFGMJNPAoCLGw+zbnwqyX1Kt6p5wGLew T3saBEkn40wcp5vyTDfHv4g8Qv+4w0EKV/vrzlVhHJcnBm3v78vPiEMI7lGBU8sbJJd+ gw7EKlNeGF+RIkCSO3PsZ5nYJabDYDpBBQ+fTgYx1U7KA97GbxrPHonB2f45lhVCUL3g lR+U7OulrjlWNq60afbZL3F8em6ZMTCmIIK5mxomWMPDpbut7TdZRwYsP5gvWrMOYnZZ a2rQ== 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=LA59Tp/RXF4QT6mlf2rRIkzJ+Ox4F1claETjzYtQOCKZWKvwY7KueI/PA4Fii5mvZc 2BiedOsxfX0SRqOF/buSk3LaIQ5bc1B7qvXOt6V6j7ivUmUnNUamUs8Cf5pn4FeZ8/Hi SchacAmUN6ItNQa0ilfUtN1YYlZpY/cveLVyP6n0T9BaBphtBhOiFsIdK6taJIdMh+T2 RlI5On0NWs19v0bQQTh6Q3bQ2eBQ3prMH3IiFPN3cONIwUHkCw4bhmd1smYIY423OIKP lsn9Y4cQ5K8DJO3tLej+kWP2uicejWgeEltigcozn5cCfO/CSuKNLhGcpIjhIPcwAMsb 8bnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=S6GSu2py; 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 dm10-20020a170907948a00b0078200f886bbsi2305932ejc.361.2022.11.03.12.20.05; Thu, 03 Nov 2022 12:20:29 -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=S6GSu2py; 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 S231589AbiKCTRf (ORCPT + 99 others); Thu, 3 Nov 2022 15:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbiKCTQ7 (ORCPT ); Thu, 3 Nov 2022 15:16:59 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CBF761EC78; Thu, 3 Nov 2022 12:16:58 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id B3B5B20C333F; Thu, 3 Nov 2022 12:16:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B3B5B20C333F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1667503018; bh=jONrZhhKFLS3dleWg98wZ6FgVfueM2/7lN9acbPbclk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=S6GSu2pyVBVqTewSG+5P3XDJzPDCy+PVJFZyi9XAN6N8DQMAabKrlFqwhE3BVqekL N52l/eYwweHIwhQILB9uMrnVZukWsohVX62yNu46gG+zRuw0bxBnxQnG+V2RQAtmT6 W33Mp1PyPwZKfGHCpO5AcmWKzNvHgVc38hOpoyJo= 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 v10 09/12] net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES Date: Thu, 3 Nov 2022 12:16:27 -0700 Message-Id: <1667502990-2559-10-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667502990-2559-1-git-send-email-longli@linuxonhyperv.com> References: <1667502990-2559-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?1748503865791157017?= X-GMAIL-MSGID: =?utf-8?q?1748503865791157017?= 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. */