[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1757537841-5063-1-git-send-email-haiyangz@linux.microsoft.com>
Date: Wed, 10 Sep 2025 13:57:21 -0700
From: Haiyang Zhang <haiyangz@...ux.microsoft.com>
To: linux-hyperv@...r.kernel.org,
netdev@...r.kernel.org
Cc: haiyangz@...rosoft.com,
decui@...rosoft.com,
kys@...rosoft.com,
wei.liu@...nel.org,
edumazet@...gle.com,
davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
longli@...rosoft.com,
ssengar@...ux.microsoft.com,
ernis@...ux.microsoft.com,
dipayanroy@...ux.microsoft.com,
kotaranov@...rosoft.com,
shirazsaleem@...rosoft.com,
andrew+netdev@...n.ch,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding
From: Haiyang Zhang <haiyangz@...rosoft.com>
If HW Channel (HWC) is not responding, reduce the waiting time, so further
steps will fail quickly.
This will prevent getting stuck for a long time (30 minutes or more), for
example, during unloading while HWC is not responding.
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
drivers/net/ethernet/microsoft/mana/hw_channel.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c
index ef072e24c46d..ada6c78a2bef 100644
--- a/drivers/net/ethernet/microsoft/mana/hw_channel.c
+++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c
@@ -881,7 +881,12 @@ 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!\n");
+ dev_err(hwc->dev, "HWC: Request timed out: %u ms\n",
+ hwc->hwc_timeout);
+
+ /* Reduce further waiting if HWC no response */
+ if (hwc->hwc_timeout > 1)
+ hwc->hwc_timeout = 1;
err = -ETIMEDOUT;
goto out;
--
2.34.1
Powered by blists - more mailing lists