** Description changed:

+ BugLink: https://bugs.launchpad.net/bugs/2143197
+ 
  [Impact]
+ Dell Thunderbolt dock ethernet (Intel I226 NIC) can fail to initialize after
+ hotplug. After unplug/replug, the interface may appear with an invalid MAC
+ (00:00:00:00:00:00) or stale MAC and wired networking does not work.
+ Cold boot is unaffected; issue is hotplug-specific.
  
- Dell Thunderbolt dock ethernet (Intel I226 NIC) fails to initialize on
- hotplug, resulting in no network connectivity after dock reconnection.
- 
- When users unplug and reconnect Dell Thunderbolt docks with integrated
- ethernet, the network interface fails to come up and shows an invalid
- MAC address (00:00:00:00:00:00 or stale MAC from previous session). This
- prevents users from using wired ethernet connectivity after dock
- hotplug.
- 
- Error symptoms:
- - Network interface shows invalid/wrong MAC address after hotplug
- - `ip link` shows interface but no connectivity
- - No error messages in dmesg, interface simply doesn't work
- - Cold boot works fine, only hotplug scenarios fail
- 
- Affected hardware: Dell systems with Thunderbolt docks (Dell WD25TB4 and
- similar models with Intel II226 ethernet)
- 
- Failure rate: Intermittent on hotplug (50-80% failure rate with 600ms
- delay)
- 
- Root cause: BIOS MAC passthrough takes longer than the current 600ms
- wait time. Debug testing shows BIOS writes the correct MAC address
- between 300-800ms after driver probe starts during hotplug. The current
- 600ms delay is insufficient for docks that need the full timing window.
- 
+ Affected systems include Dell platforms with Thunderbolt docks such as
+ WD25TB4-class docks carrying Intel I226 ethernet.
  
  [Fix]
+ Increase the existing Thunderbolt MAC passthrough wait in igc probe path:
+ - from 600ms
+ - to   1000ms
  
- Increase the Thunderbolt MAC passthrough delay from 600ms to 1000ms in
- the IGC driver.
+ Ubuntu already carries a SAUCE workaround (commit 534981aaa8) that uses
+ fixed delay timing. Newer Dell docks need a longer timing window.
  
- The current Ubuntu SAUCE patch (commit 534981aaa831, since 2022) adds a
- 600ms delay for Thunderbolt-attached devices to wait for BIOS MAC
- passthrough to complete. Testing on Lenovo TBT4 docks showed 600ms was
- sufficient, but newer Dell docks require longer timing.
+ Debug testing shows BIOS MAC update timing:
+ - cold boot: MAC already correct at probe start
+ - hotplug: MAC becomes correct at ~300-800ms after probe starts
  
- Debug kernel testing (2026-03-04) revealed:
- - Cold boot: MAC is correct at T+0ms (BIOS completes during POST)
- - Hotplug: MAC changes at T+300-800ms (BIOS writes during runtime)
- - Dell WD25TB4: Observed MAC changes as late as T+800ms
+ Use 1000ms (observed 800ms worst-case + margin) to make hotplug
+ reliable.
  
- The fix increases the delay to 1000ms (800ms worst-case + 200ms safety
- margin) to ensure reliable operation across all Thunderbolt dock models.
- 
- This is an Ubuntu-specific workaround. The patch was proposed upstream
- in 2021 but not merged because upstream prefers a proper MAC polling
- solution instead of fixed delays. For Ubuntu, the pragmatic fixed-delay
- approach is appropriate for stable kernel support.
- 
- Upstream discussion:
+ Upstream context:
  https://lore.kernel.org/lkml/[email protected]/
- 
- Changes:
- ```diff
- diff --git a/drivers/net/ethernet/intel/igc/igc_main.c 
b/drivers/net/ethernet/intel/igc/igc_main.c
- @@ -7189,7 +7189,7 @@ static int igc_probe(struct pci_dev *pdev,
-       memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));
-  
-       if (pci_is_thunderbolt_attached(pdev))
- -             msleep(600);
- +             msleep(1000);
-  
-       /* Initialize skew-specific constants */
-       err = ei->get_invariants(hw);
- ```
+ (Upstream preferred polling over fixed delay; Ubuntu keeps minimal stable
+ fixed-delay workaround.)
  
  [Test Plan]
+ 1. Boot with dock attached; confirm interface has valid MAC and link works.
+ 2. Unplug dock, wait 5s, replug, wait for enumeration.
+ 3. Verify MAC is valid/correct and connectivity works.
+ 4. Repeat hotplug cycle 10 times.
  
- **Hardware required:** Dell system with Thunderbolt dock containing
- Intel I226 ethernet
- 
- **Test procedure:**
- 
- 1. Boot system with dock connected
- 2. Verify ethernet works:
-    ```bash
-    ip link show
-    # Check MAC address is valid (not 00:00:00:00:00:00)
-    ```
- 
- 3. Unplug Thunderbolt dock
- 4. Wait 5 seconds
- 5. Replug Thunderbolt dock
- 6. Wait 10 seconds for device enumeration
- 7. Check ethernet MAC address:
-    ```bash
-    ip link show | grep -A1 "enp.*s0"
-    # Verify MAC address matches dock's MAC (not 00:00:00:00:00:00 or stale 
address)
-    ```
- 
- 8. Repeat steps 3-7 ten times
- 
- **Without the patch:**
- - Hotplug may fail 50-80% of attempts
- - MAC address is invalid (00:00:00:00:00:00) or stale from previous session
- - Network interface doesn't work after hotplug
- 
- **With the patch:**
- - Hotplug succeeds 100% of attempts
- - MAC address is correct after every hotplug
- - Network interface works reliably
- 
- **Note:** Cold boot scenario already works with or without the patch.
- This fix specifically addresses the hotplug timing issue.
- 
+ Expected results:
+ - Without this change: intermittent hotplug failures (~50-80% observed).
+ - With this change: MAC is correct and networking works on every cycle.
  
  [Where problems could occur]
- 
- The change affects the Intel IGC ethernet driver initialization path for
- Thunderbolt-attached devices.
- 
- If 1000ms is still insufficient for some future dock models with even
- slower BIOS MAC passthrough, those docks would still exhibit the hotplug
- failure. However, this is unlikely as 1000ms provides substantial margin
- (250ms more than observed worst-case).
- 
- The increased delay adds 400ms to device probe time during hotplug. This is a 
minor impact:
- - Only affects Thunderbolt-attached I226 devices (not regular PCIe ethernet)
- - Only during hotplug (cold boot timing already includes BIOS delays in POST)
- - 400ms is imperceptible to users compared to the 5-6 seconds of PCIe 
enumeration
- 
- If the delay logic is somehow applied to non-Thunderbolt devices due to
- a kernel bug, those devices would experience unnecessary 1000ms probe
- delays. However, the `pci_is_thunderbolt_attached()` check is a well-
- established kernel API used by many drivers.
- 
- The patch does not change any device functionality, register access, or
- interrupt handling - it only extends an existing wait period. The code
- path is identical before and after the change, just with a longer sleep
- duration.
- 
- 
- This is an update to an existing Ubuntu SAUCE patch (commit 534981aaa831, 
"igc: wait for the MAC copy when enabled MAC passthrough", since 2022-08-03).
- 
- The original 600ms delay was based on testing with Lenovo TBT4 docks.
- Newer Dell docks exhibit slower BIOS MAC passthrough timing, requiring
- the increase to 1000ms.
- 
- This patch is Ubuntu-specific (SAUCE) because upstream prefers a MAC address 
polling solution rather than fixed delays. However, implementing proper MAC 
polling would be a substantial change requiring:
- - New register polling logic
- - Hardware state validation
- - Timeout and error handling
- - Upstream review and acceptance
- 
- For stable kernel maintenance, extending the proven fixed-delay approach
- is the appropriate solution. The change is minimal, low-risk, and
- directly addresses the reported issue.
- 
- The patch applies to all Ubuntu OEM kernels with the IGC driver. It has
- been tested on oem-6.17 kernel (6.17.0-3013) with Dell WD25TB4 dock and
- shows 100% success rate across multiple hotplug cycles.
- 
- Debug kernel testing methodology:
- - Instrumented driver to print MAC register values every 100ms for 2000ms
- - Observed actual BIOS MAC write timing on hardware
- - Confirmed MAC stability after change completes
- - Validated both cold boot and hotplug scenarios
- 
- Related Launchpad bug: https://bugs.launchpad.net/bugs/1942999 (original
- 600ms patch)
+ - Probe time for Thunderbolt-attached igc devices increases by 400ms.
+ - Scope is limited to pci_is_thunderbolt_attached() path.
+ - If a future dock requires >1000ms, hotplug failure could still occur.
+ - No functional changes beyond extending an existing sleep.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2143197

Title:
  igc: Increase Thunderbolt MAC passthrough delay to 1000ms

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-oem-6.17/+bug/2143197/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to