From nobody Thu Oct 2 21:40:07 2025 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0BA9272E7B; Wed, 10 Sep 2025 20:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757537861; cv=none; b=QmvjFKoh3OVh/aHwhnQgJ5YYprnCdDW3ucP0i84TAG/i8Jh/MeCnE3RnQsLuQnE+oFYu5k+xXOEbuMgRObNkULLC7SGElEylhk+Oo3GbOCLqqX29GoaypX5sTUgrM2/MSFVS0S3tqwXag+K6uAO/B5HphSlzvNjI2EXnxGVQEko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757537861; c=relaxed/simple; bh=mgH+RApEREFbxuYp5FmMugM97WajwuPrp/KpthV4H70=; h=From:To:Cc:Subject:Date:Message-Id; b=RYtmEroO9idJeuhGhgPy/TPXs6BZ2swF1CT0KWFuel3asGM+u167AqGGaMjeisURr0JDwx8iHkiQIIZ8Laq1HfAYdhhhRn5YgmLnBlKbbdSWfVkuG3inr/opMCXRtXeYq+pzlNV/qlo4H6b1c2o0qLf6ntzujJb4YaZVOSTodVk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=c+hm8Jcw; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="c+hm8Jcw" Received: by linux.microsoft.com (Postfix, from userid 1006) id B7D0D20171B8; Wed, 10 Sep 2025 13:57:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B7D0D20171B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1757537852; bh=N/iRK+5SlnN9/G2FPEN7vTk8IiFryrGhXVADYNhLhW4=; h=From:To:Cc:Subject:Date:From; b=c+hm8Jcw2pW+QahnVxFM3ACweqy/H9hMx2v/oqU2GYqqLI6j3Phzi+e9AHODwBr1k ye7E/ErWx+MOyur4IFUUXRuEN9Rp1U1hMOUUZDOKS5wIHMcqrSsHKnw4zyk3ynNTUk 8+NuVoyjh4SIsq6DxVIq5wwQyPzXPOEFLvNJ+3rg= From: Haiyang Zhang To: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org Cc: haiyangz@microsoft.com, decui@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, edumazet@google.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, longli@microsoft.com, ssengar@linux.microsoft.com, ernis@linux.microsoft.com, dipayanroy@linux.microsoft.com, kotaranov@microsoft.com, shirazsaleem@microsoft.com, andrew+netdev@lunn.ch, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding Date: Wed, 10 Sep 2025 13:57:21 -0700 Message-Id: <1757537841-5063-1-git-send-email-haiyangz@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Haiyang Zhang 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 --- 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 *h= wc, u32 req_len, if (!wait_for_completion_timeout(&ctx->comp_event, (msecs_to_jiffies(hwc->hwc_timeout)))) { if (hwc->hwc_timeout !=3D 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 =3D 1; =20 err =3D -ETIMEDOUT; goto out; --=20 2.34.1