Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mana: Reduce waiting time if HWC not responding

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@microsoft.com>
Link: https://patch.msgid.link/1757537841-5063-1-git-send-email-haiyangz@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Haiyang Zhang and committed by
Jakub Kicinski
c4deabbc fdae0ab6

+6 -1
+6 -1
drivers/net/ethernet/microsoft/mana/hw_channel.c
··· 881 881 if (!wait_for_completion_timeout(&ctx->comp_event, 882 882 (msecs_to_jiffies(hwc->hwc_timeout)))) { 883 883 if (hwc->hwc_timeout != 0) 884 - dev_err(hwc->dev, "HWC: Request timed out!\n"); 884 + dev_err(hwc->dev, "HWC: Request timed out: %u ms\n", 885 + hwc->hwc_timeout); 886 + 887 + /* Reduce further waiting if HWC no response */ 888 + if (hwc->hwc_timeout > 1) 889 + hwc->hwc_timeout = 1; 885 890 886 891 err = -ETIMEDOUT; 887 892 goto out;