diff mbox series

[1/1,H/OEM-5.13/OEM-5.14/U] UBUNTU: SAUCE: igc: wait for the MAC copy when enabled MAC passthrough

Message ID 20210908084952.41486-2-aaron.ma@canonical.com
State New
Headers show
Series UBUNTU: SAUCE: Fix invalid MAC address after hotplug tbt dock | expand

Commit Message

Aaron Ma Sept. 8, 2021, 8:49 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1942999

Such as dock hot plug event when runtime, for hardware implementation,
the MAC copy takes less than one second when BIOS enabled MAC passthrough.
After test on Lenovo TBT4 dock, 600ms is enough to update the
MAC address.
Otherwise ethernet fails to work.

Link: https://lore.kernel.org/lkml/20210702045120.22855-2-aaron.ma@canonical.com/
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 51be5b9b07bd..512739f20cad 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5088,6 +5088,9 @@  static int igc_probe(struct pci_dev *pdev,
 	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
 	memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));
 
+	if (pci_is_thunderbolt_attached(pdev))
+		msleep(600);
+
 	/* Initialize skew-specific constants */
 	err = ei->get_invariants(hw);
 	if (err)