From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D26DE309DDD; Wed, 17 Sep 2025 13:02:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758114126; cv=none; b=gsVDr5d5tXIaJp1uFMjsAtsPiuKEArdQOqLRfyHmsP8RdVgbeuhDoCjU+Q4csZ3jFIYMYG71J++R+wzntlSmdFibwXRCKmJALJpgK4avafalxto77H6hIgtVjIbRLQdnahlGcXLNDXR/LR+TL+/jqeRX4hDWu62JhuGX8TPdGEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758114126; c=relaxed/simple; bh=2JDImE8+fW7/C1e+Auflkk3ia9LGBD7Aq4QAzyCldtA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kR0K5ib1BkgUCN3CA2lSihB+mO3qAvLORkmEz1rdnaFIIF9DzrxZooJ49X3k6KX+bK9gERBQGb9ueuZFhwLhWFJ53zE4qUyXrmjuvjJpgfikJ5s9AY09NgpBRWpa3M3WhDNS9h7oG1Rb2yiUdN9Mpm+UPH151VVGmig4d6RFHH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ww67k4Xb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ww67k4Xb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49743C4CEF0; Wed, 17 Sep 2025 13:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758114126; bh=2JDImE8+fW7/C1e+Auflkk3ia9LGBD7Aq4QAzyCldtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ww67k4Xb5rKEfmfJNx2a+2oYn4v15Yd17JVVjyN6fYb4nf/rhPk7ueJhadAtgo5le 935Biz1y7sm+kGT5sDplfodugl51AmonGxjgpR3szZOymNslHWiT1FajGz1pX1Cvg0 TCakVGulR7gXzjXIr5RdoQFWU6XsOyJshzG/it+Q= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kohei Enju , Paul Menzel , Tony Nguyen , Sasha Levin , Rinitha S Subject: [PATCH 6.1 54/78] igb: fix link test skipping when interface is admin down Date: Wed, 17 Sep 2025 14:35:15 +0200 Message-ID: <20250917123330.885427386@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250917123329.576087662@linuxfoundation.org> References: <20250917123329.576087662@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kohei Enju [ Upstream commit d709f178abca22a4d3642513df29afe4323a594b ] The igb driver incorrectly skips the link test when the network interface is admin down (if_running == false), causing the test to always report PASS regardless of the actual physical link state. This behavior is inconsistent with other drivers (e.g. i40e, ice, ixgbe, etc.) which correctly test the physical link state regardless of admin state. Remove the if_running check to ensure link test always reflects the physical link state. Fixes: 8d420a1b3ea6 ("igb: correct link test not being run when link is down") Signed-off-by: Kohei Enju Reviewed-by: Paul Menzel Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index ceff537d9d22d..ba067c3860a51 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -2081,11 +2081,8 @@ static void igb_diag_test(struct net_device *netdev, } else { dev_info(&adapter->pdev->dev, "online testing starting\n"); - /* PHY is powered down when interface is down */ - if (if_running && igb_link_test(adapter, &data[TEST_LINK])) + if (igb_link_test(adapter, &data[TEST_LINK])) eth_test->flags |= ETH_TEST_FL_FAILED; - else - data[TEST_LINK] = 0; /* Online tests aren't run; pass by default */ data[TEST_REG] = 0; -- 2.51.0