Skip to content

Commit b36bebb

Browse files
hyperenjugregkh
authored andcommitted
igb: fix link test skipping when interface is admin down
[ Upstream commit d709f17 ] 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: 8d420a1 ("igb: correct link test not being run when link is down") Signed-off-by: Kohei Enju <enjuk@amazon.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5530ace commit b36bebb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/ethernet/intel/igb/igb_ethtool.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,11 +2081,8 @@ static void igb_diag_test(struct net_device *netdev,
20812081
} else {
20822082
dev_info(&adapter->pdev->dev, "online testing starting\n");
20832083

2084-
/* PHY is powered down when interface is down */
2085-
if (if_running && igb_link_test(adapter, &data[TEST_LINK]))
2084+
if (igb_link_test(adapter, &data[TEST_LINK]))
20862085
eth_test->flags |= ETH_TEST_FL_FAILED;
2087-
else
2088-
data[TEST_LINK] = 0;
20892086

20902087
/* Online tests aren't run; pass by default */
20912088
data[TEST_REG] = 0;

0 commit comments

Comments
 (0)