Re: [PATCH net-next v4] net: mana: Add MAC address to vPort logs and clarify error messages

From: Simon Horman

Date: Sun Mar 01 2026 - 11:41:50 EST


On Wed, Feb 25, 2026 at 11:22:41AM -0800, Erni Sri Satya Vennela wrote:
> 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@xxxxxxxxxxxxxxxxxxx>

...

> diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c

...

> @@ -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, "%s:%d: Command 0x%x timed out: %u ms\n",
> + __func__, __LINE__, command, hwc->hwc_timeout);

I have reservations about the usefulness of including __func__ and __LINE__
in debug messages. In a nutshell, it requires the logs to be correlated
(exactly?) with the source used to build the driver. And at that point
I think other mechanism - e.g. dynamic trace points - are going to be
useful if the debug message (without function and line information)
is insufficient to pinpoint the problem.

This is a general statement, rather than something specifically
about this code. But nonetheless I'd advise against adding this
information here.

>
> /* 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, "%s:%d: Command 0x%x failed with status: 0x%x\n",
> + __func__, __LINE__, command, ctx->status_code);

> err = -EPROTO;
> goto out;
> }

...