diff options
| author | Kohei Enju <[email protected]> | 2025-08-15 06:26:31 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-09-09 16:48:30 +0000 |
| commit | d709f178abca22a4d3642513df29afe4323a594b (patch) | |
| tree | 8ccc98f6e22daae927e95522dc8fbf75aed8f5f3 /drivers/net/ethernet/intel/igb/igb_ethtool.c | |
| parent | igb: Fix NULL pointer dereference in ethtool loopback test (diff) | |
| download | kernel-d709f178abca22a4d3642513df29afe4323a594b.tar.gz kernel-d709f178abca22a4d3642513df29afe4323a594b.zip | |
igb: fix link test skipping when interface is admin down
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 <[email protected]>
Reviewed-by: Paul Menzel <[email protected]>
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_ethtool.c')
| -rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 92ef33459aec..7b8f32c5169a 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; |
