[v1,1/1] net/e1000/base: fix link power down
Checks
Commit Message
Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.
Fix it to correctly power down the link under all circumstances that
were supported by old logic.
Fixes: 44dddd14059f ("net/e1000/base: remove duplicated codes")
Cc: guinanx.sun@intel.com
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/e1000/base/e1000_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -107,7 +107,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw)
return;
/* If the management interface is not enabled, then power down */
- if (phy->ops.check_reset_block(hw))
+ if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw)))
e1000_power_down_phy_copper(hw);
}