[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250312032251.2259794-1-hamish.martin@alliedtelesis.co.nz>
Date: Wed, 12 Mar 2025 16:22:50 +1300
From: Hamish Martin <hamish.martin@...iedtelesis.co.nz>
To: anthony.l.nguyen@...el.com,
przemyslaw.kitszel@...el.com
Cc: intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org,
Hamish Martin <hamish.martin@...iedtelesis.co.nz>
Subject: [PATCH net] igb: Prevent IPCFGN write resetting autoneg advertisement register
An issue is observed on the i210 when autonegotiation advertisement is set
to a specific subset of the supported speeds but the requested settings
are not correctly set in the Copper Auto-Negotiation Advertisement Register
(Page 0, Register 4).
Initially, the advertisement register is correctly set by the driver code
(in igb_phy_setup_autoneg()) but this register's contents are modified as a
result of a later write to the IPCNFG register in igb_set_eee_i350(). It is
unclear what the mechanism is for the write of the IPCNFG register to lead
to the change in the autoneg advertisement register.
The issue can be observed by, for example, restricting the advertised speed
to just 10MFull. The expected result would be that the link would come up
at 10MFull, but actually the phy ends up advertising a full suite of speeds
and the link will come up at 100MFull.
The problem is avoided by ensuring that the write to the IPCNFG register
occurs before the write to the autoneg advertisement register.
Signed-off-by: Hamish Martin <hamish.martin@...iedtelesis.co.nz>
---
drivers/net/ethernet/intel/igb/igb_main.c | 32 ++++++++++++-----------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index d368b753a467..f0c5ffa8450d 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2382,6 +2382,23 @@ void igb_reset(struct igb_adapter *adapter)
(adapter->flags & IGB_FLAG_MAS_ENABLE)) {
igb_enable_mas(adapter);
}
+
+ /* Re-establish EEE setting */
+ if (hw->phy.media_type == e1000_media_type_copper) {
+ switch (mac->type) {
+ case e1000_i350:
+ case e1000_i210:
+ case e1000_i211:
+ igb_set_eee_i350(hw, true, true);
+ break;
+ case e1000_i354:
+ igb_set_eee_i354(hw, true, true);
+ break;
+ default:
+ break;
+ }
+ }
+
if (hw->mac.ops.init_hw(hw))
dev_err(&pdev->dev, "Hardware Error\n");
@@ -2412,21 +2429,6 @@ void igb_reset(struct igb_adapter *adapter)
}
}
#endif
- /* Re-establish EEE setting */
- if (hw->phy.media_type == e1000_media_type_copper) {
- switch (mac->type) {
- case e1000_i350:
- case e1000_i210:
- case e1000_i211:
- igb_set_eee_i350(hw, true, true);
- break;
- case e1000_i354:
- igb_set_eee_i354(hw, true, true);
- break;
- default:
- break;
- }
- }
if (!netif_running(adapter->netdev))
igb_power_down_link(adapter);
--
2.48.1
Powered by blists - more mailing lists