[PATCH 11/34] net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES
authorAjay Sharma <sharmaajay@microsoft.com>
Thu, 3 Nov 2022 19:16:27 +0000 (12:16 -0700)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 1 Nov 2024 04:23:37 +0000 (05:23 +0100)
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 <sharmaajay@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1667502990-2559-10-git-send-email-longli@linuxonhyperv.com
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
(cherry picked from commit de372f2a9ca7ada2698ecac7df8f02407cd98fa0)
Signed-off-by: Bastian Blank <waldi@debian.org>
Gbp-Pq: Topic features/all/ethernet-microsoft
Gbp-Pq: Name 0011-net-mana-Define-and-process-GDMA-response-code-GDMA_.patch

drivers/net/ethernet/microsoft/mana/hw_channel.c
include/net/mana/gdma.h

index f2e25f97e4c2c372ce6cd147c48036bfda1d7b13..fdf1cc83c9a195abb816d6c3a92ddf8a55b25823 100644 (file)
@@ -842,7 +842,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;
index 11fc1cc67c0104402d3315b93358667788e16ad4..202ac405ab593b553ad1b5cb29d0236380802f6c 100644 (file)
@@ -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.
  */