Patch "igc: fix a log entry using uninitialized netdev" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    igc: fix a log entry using uninitialized netdev

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     igc-fix-a-log-entry-using-uninitialized-netdev.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cff4593b348e5fbbca12a0bcf930e8c718f0cbba
Author: Corinna Vinschen <vinschen@xxxxxxxxxx>
Date:   Tue Apr 23 12:24:54 2024 +0200

    igc: fix a log entry using uninitialized netdev
    
    [ Upstream commit 86167183a17e03ec77198897975e9fdfbd53cb0b ]
    
    During successful probe, igc logs this:
    
    [    5.133667] igc 0000:01:00.0 (unnamed net_device) (uninitialized): PHC added
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    The reason is that igc_ptp_init() is called very early, even before
    register_netdev() has been called. So the netdev_info() call works
    on a partially uninitialized netdev.
    
    Fix this by calling igc_ptp_init() after register_netdev(), right
    after the media autosense check, just as in igb.  Add a comment,
    just as in igb.
    
    Now the log message is fine:
    
    [    5.200987] igc 0000:01:00.0 eth0: PHC added
    
    Signed-off-by: Corinna Vinschen <vinschen@xxxxxxxxxx>
    Reviewed-by: Hariprasad Kelam <hkelam@xxxxxxxxxxx>
    Acked-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e83700ad7e622..5715fc6779117 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6908,8 +6908,6 @@ 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 */
@@ -6931,6 +6929,9 @@ 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux