]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: mana: Add MAC address to vPort logs and clarify error messages
authorErni Sri Satya Vennela <ernis@linux.microsoft.com>
Mon, 2 Mar 2026 17:41:52 +0000 (09:41 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Mar 2026 11:20:14 +0000 (12:20 +0100)
Add MAC address to vPort configuration success message and update error
message to be more specific about HWC message errors in
mana_send_request.

Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260302174204.234837-1-ernis@linux.microsoft.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microsoft/mana/hw_channel.c
drivers/net/ethernet/microsoft/mana/mana_en.c

index ba3467f1e2eaefe1599183ddb014eef680c545c3..91975bdb56867488d6157f2071b8791fe85c8a3f 100644 (file)
@@ -853,6 +853,7 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
        struct hwc_caller_ctx *ctx;
        u32 dest_vrcq = 0;
        u32 dest_vrq = 0;
+       u32 command;
        u16 msg_id;
        int err;
 
@@ -878,6 +879,7 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
        req_msg->req.hwc_msg_id = msg_id;
 
        tx_wr->msg_size = req_len;
+       command = req_msg->req.msg_type;
 
        if (gc->is_pf) {
                dest_vrq = hwc->pf_dest_vrq_id;
@@ -893,8 +895,8 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
        if (!wait_for_completion_timeout(&ctx->comp_event,
                                         (msecs_to_jiffies(hwc->hwc_timeout)))) {
                if (hwc->hwc_timeout != 0)
-                       dev_err(hwc->dev, "HWC: Request timed out: %u ms\n",
-                               hwc->hwc_timeout);
+                       dev_err(hwc->dev, "Command 0x%x timed out: %u ms\n",
+                               command, hwc->hwc_timeout);
 
                /* Reduce further waiting if HWC no response */
                if (hwc->hwc_timeout > 1)
@@ -914,9 +916,9 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
                        err = -EOPNOTSUPP;
                        goto out;
                }
-               if (req_msg->req.msg_type != MANA_QUERY_PHY_STAT)
-                       dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n",
-                               ctx->status_code);
+               if (command != MANA_QUERY_PHY_STAT)
+                       dev_err(hwc->dev, "Command 0x%x failed with status: 0x%x\n",
+                               command, ctx->status_code);
                err = -EPROTO;
                goto out;
        }
index 56ee993e3a4360c4d17345b5d8f3892db6067c66..a868c28c82804bda2477a5b95b6ce871e80aa366 100644 (file)
@@ -1021,8 +1021,8 @@ static int mana_send_request(struct mana_context *ac, void *in_buf,
 
                if (req->req.msg_type != MANA_QUERY_PHY_STAT &&
                    mana_need_log(gc, err))
-                       dev_err(dev, "Failed to send mana message: %d, 0x%x\n",
-                               err, resp->status);
+                       dev_err(dev, "Command 0x%x failed with status: 0x%x, err: %d\n",
+                               req->req.msg_type, resp->status, err);
                return err ? err : -EPROTO;
        }
 
@@ -1335,8 +1335,8 @@ int mana_cfg_vport(struct mana_port_context *apc, u32 protection_dom_id,
        apc->tx_shortform_allowed = resp.short_form_allowed;
        apc->tx_vp_offset = resp.tx_vport_offset;
 
-       netdev_info(apc->ndev, "Configured vPort %llu PD %u DB %u\n",
-                   apc->port_handle, protection_dom_id, doorbell_pg_id);
+       netdev_info(apc->ndev, "Enabled vPort %llu PD %u DB %u MAC %pM\n",
+                   apc->port_handle, protection_dom_id, doorbell_pg_id, apc->mac_addr);
 out:
        if (err)
                mana_uncfg_vport(apc);