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 B15923C465; Tue, 30 Sep 2025 14:49:48 +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=1759243788; cv=none; b=pXHyBmt4ZTq7fpaNtizKeNRQmsVuvppiVyW25k1DMBCb/5TpqZraj8bLF9Vf+2LC8oSaWb2Xhy/B1TQtjpEbYWI0IiNu/Z8IgjlUo8NTN4AkWJeIYWgj7vjbLl/pHxQ+mG5dN+Kry3OtDmOHFCkypjboTIxQFGMsTR/rRU/bezU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759243788; c=relaxed/simple; bh=mBIoIXuPNWgJtPaF4EIF9IhR39OQqgwKqTEkYU0o+rE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g568nD28R91JJ1KbWgIX8nH7NqzL001BxGx9LHoCrM/VJ5rm5PIAC5QPGbDbyobpdybOXC9iUWl5/Fm5xCFv8ZWxtYFq4bLCHAwuHtE2KJUEbvl+psgijwHGjNBcXLIb5T0WlXqLYVljuefoiXpATZ2svTqSO9k0LEsz6x1pEgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X4Munfb8; 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="X4Munfb8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FD04C4CEF0; Tue, 30 Sep 2025 14:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759243787; bh=mBIoIXuPNWgJtPaF4EIF9IhR39OQqgwKqTEkYU0o+rE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X4Munfb8l00zu0T7zhbU9gT52ZMcDFvbjXShirbf+C6vncy/lF7vAhKS90CtZfkdT 0B4YdynZMbNOeaK5u+YPKvm3ZbNs6/qFuJVTvwp308QDEBJYC3j7iB7a2PavNYqm5G o1XRAKiWQ0djgXlitb6FapYETPipZbTP7K2w44nw= 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 5.4 18/81] igb: fix link test skipping when interface is admin down Date: Tue, 30 Sep 2025 16:46:20 +0200 Message-ID: <20250930143820.429867818@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930143819.654157320@linuxfoundation.org> References: <20250930143819.654157320@linuxfoundation.org> User-Agent: quilt/0.69 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 5.4-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 de2c39436fe0a..8166fb619db45 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -2070,11 +2070,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