mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 17:36:44 +07:00
igb: implement igb_ptp_suspend
Make igb_ptp_stop take advantage of this new function to reduce code duplication. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
4f3ce71bb8
commit
e3f2350de8
@ -550,6 +550,7 @@ void igb_set_fw_version(struct igb_adapter *);
|
||||
void igb_ptp_init(struct igb_adapter *adapter);
|
||||
void igb_ptp_stop(struct igb_adapter *adapter);
|
||||
void igb_ptp_reset(struct igb_adapter *adapter);
|
||||
void igb_ptp_suspend(struct igb_adapter *adapter);
|
||||
void igb_ptp_rx_hang(struct igb_adapter *adapter);
|
||||
void igb_ptp_rx_rgtstamp(struct igb_q_vector *q_vector, struct sk_buff *skb);
|
||||
void igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector, unsigned char *va,
|
||||
|
@ -1147,12 +1147,13 @@ void igb_ptp_init(struct igb_adapter *adapter)
|
||||
}
|
||||
|
||||
/**
|
||||
* igb_ptp_stop - Disable PTP device and stop the overflow check.
|
||||
* @adapter: Board private structure.
|
||||
* igb_ptp_suspend - Disable PTP work items and prepare for suspend
|
||||
* @adapter: Board private structure
|
||||
*
|
||||
* This function stops the PTP support and cancels the delayed work.
|
||||
**/
|
||||
void igb_ptp_stop(struct igb_adapter *adapter)
|
||||
* This function stops the overflow check work and PTP Tx timestamp work, and
|
||||
* will prepare the device for OS suspend.
|
||||
*/
|
||||
void igb_ptp_suspend(struct igb_adapter *adapter)
|
||||
{
|
||||
if (!(adapter->ptp_flags & IGB_PTP_ENABLED))
|
||||
return;
|
||||
@ -1166,6 +1167,17 @@ void igb_ptp_stop(struct igb_adapter *adapter)
|
||||
adapter->ptp_tx_skb = NULL;
|
||||
clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* igb_ptp_stop - Disable PTP device and stop the overflow check.
|
||||
* @adapter: Board private structure.
|
||||
*
|
||||
* This function stops the PTP support and cancels the delayed work.
|
||||
**/
|
||||
void igb_ptp_stop(struct igb_adapter *adapter)
|
||||
{
|
||||
igb_ptp_suspend(adapter);
|
||||
|
||||
if (adapter->ptp_clock) {
|
||||
ptp_clock_unregister(adapter->ptp_clock);
|
||||
|
Loading…
Reference in New Issue
Block a user