Skip to contentSkip to conversation

Revert "igc: fix a log entry using uninitialized netdev"

PATCH In review Sasha Neftin 2 participants 2 messages May 29, 2024 – Jun 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "igc: fix a log entry using uninitialized netdev"

This reverts commit 86167183a17e03ec77198897975e9fdfbd53cb0b.

igc_ptp_init() needs to be called before igc_reset(), otherwise kernel crash could be observed. Following the corresponding discussion [1] and
[2] revert this commit.

el.com/ [1]

Fixes 86167183a17e ("igc: fix a log entry using uninitialized netdev")
---
 drivers/net/ethernet/intel/igc/igc_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +2 -3
index 305e05294a26..87b655b839c1 100644
@@ -7032,6 +7032,8 @@ static int igc_probe(struct pci_dev *pdev,
 	device_set_wakeup_enable(&adapter->pdev->dev,
 				 adapter->flags & IGC_FLAG_WOL_SUPPORTED);
 
+	igc_ptp_init(adapter);
+
 	igc_tsn_clear_schedule(adapter);
 
 	/* reset the hardware with the new settings */
@@ -7053,9 +7055,6 @@ static int igc_probe(struct pci_dev *pdev,
 	/* Check if Media Autosense is enabled */
 	adapter->ei = *ei;
 
-	/* do hw tstamp init after resetting */
-	igc_ptp_init(adapter);
-
 	/* print pcie link status and MAC address */
 	pcie_print_link_status(pdev);
 	netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr);
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sasha Neftin

This reverts commit 86167183a17e03ec77198897975e9fdfbd53cb0b.

igc_ptp_init() needs to be called before igc_reset(), otherwise kernel crash could be observed. Following the corresponding discussion [1] and
[2] revert this commit.

Quoted 8 lines

el.com/ [1]

Fixes 86167183a17e ("igc: fix a log entry using uninitialized netdev")
---
  drivers/net/ethernet/intel/igc/igc_main.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)