Patch "igc: Fix suspending when PTM is active" has been added to the 5.17-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 suspending when PTM is active

to the 5.17-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-suspending-when-ptm-is-active.patch
and it can be found in the queue-5.17 subdirectory.

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



commit 0dda1a4f5e6f2d5d183929be7f13a1949c39b925
Author: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
Date:   Tue Apr 12 18:58:15 2022 -0700

    igc: Fix suspending when PTM is active
    
    [ Upstream commit 822f52e7efdc88fccffb9fbf6250a4b7666a0b0f ]
    
    Some mainboard/CPU combinations, in particular, Alder Lake-S with a
    W680 mainboard, have shown problems (system hangs usually, no kernel
    logs) with suspend/resume when PCIe PTM is enabled and active. In some
    cases, it could be reproduced when removing the igc module.
    
    The best we can do is to stop PTM dialogs from the downstream/device
    side before the interface is brought down. PCIe PTM will be re-enabled
    when the interface is being brought up.
    
    Fixes: a90ec8483732 ("igc: Add support for PTP getcrosststamp()")
    Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Acked-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
    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_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index 0d6e3215e98f..653e9f1e35b5 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -992,6 +992,17 @@ static void igc_ptp_time_restore(struct igc_adapter *adapter)
 	igc_ptp_write_i225(adapter, &ts);
 }
 
+static void igc_ptm_stop(struct igc_adapter *adapter)
+{
+	struct igc_hw *hw = &adapter->hw;
+	u32 ctrl;
+
+	ctrl = rd32(IGC_PTM_CTRL);
+	ctrl &= ~IGC_PTM_CTRL_EN;
+
+	wr32(IGC_PTM_CTRL, ctrl);
+}
+
 /**
  * igc_ptp_suspend - Disable PTP work items and prepare for suspend
  * @adapter: Board private structure
@@ -1009,8 +1020,10 @@ void igc_ptp_suspend(struct igc_adapter *adapter)
 	adapter->ptp_tx_skb = NULL;
 	clear_bit_unlock(__IGC_PTP_TX_IN_PROGRESS, &adapter->state);
 
-	if (pci_device_is_present(adapter->pdev))
+	if (pci_device_is_present(adapter->pdev)) {
 		igc_ptp_time_save(adapter);
+		igc_ptm_stop(adapter);
+	}
 }
 
 /**



[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