]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "igc: fix a log entry using uninitialized netdev"
authorSasha Neftin <sasha.neftin@intel.com>
Tue, 11 Jun 2024 16:24:55 +0000 (09:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jul 2024 10:51:14 +0000 (12:51 +0200)
commit 8eef5c3cea65f248c99cd9dcb3f84c6509b78162 upstream.

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.

Link: https://lore.kernel.org/all/8fb634f8-7330-4cf4-a8ce-485af9c0a61a@intel.com/
Link: https://lore.kernel.org/all/87o78rmkhu.fsf@intel.com/
Fixes: 86167183a17e ("igc: fix a log entry using uninitialized netdev")
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240611162456.961631-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/igc/igc_main.c

index 07feb951be7494d75fd77f340917df17d39bb8ff..58bc96021bb4ca6f8e90adf1e69e98732ea7d149 100644 (file)
@@ -6932,6 +6932,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 */
@@ -6953,9 +6955,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);