igc: Complete to commit Add basic skeleton for PTP
Subsystems (2)
PATCH 1/1 igc: Complete to commit Add basic skeleton for PTP
commit 5f2958052c58 ("igc: Add basic skeleton for PTP") Add ptp suspend method to the igc_shutdown.
--- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 2 ++ drivers/net/ethernet/intel/igc/igc_ptp.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc.h +1 -0
@@ -556,6 +556,7 @@ int igc_erase_filter(struct igc_adapter *adapter,void igc_ptp_init (struct igc_adapter *adapter);void igc_ptp_reset (struct igc_adapter *adapter); +void igc_ptp_suspend (struct igc_adapter *adapter);void igc_ptp_stop (struct igc_adapter *adapter);void igc_ptp_rx_rgtstamp (struct igc_q_vector *q_vector,struct sk_buff *skb); void igc_ptp_rx_pktstamp(struct igc_q_vector *q_vector, void *va,
drivers/net/ethernet/intel/igc/igc_main.c +2 -0
@@ -4899,6 +4899,8 @@ static int __igc_shutdown(struct pci_dev *pdev, bool *enable_wake,if (netif_running (netdev))__igc_close (netdev, true); +igc_ptp_suspend (adapter); +igc_clear_interrupt_scheme (adapter);rtnl_unlock ();
drivers/net/ethernet/intel/igc/igc_ptp.c +1 -1
@@ -641,7 +641,7 @@ void igc_ptp_init(struct igc_adapter *adapter)* This function stops the overflow check work and PTP Tx timestamp work, and * will prepare the device for OS suspend. */ -static void igc_ptp_suspend (struct igc_adapter *adapter) +void igc_ptp_suspend (struct igc_adapter *adapter) {if (!(adapter->ptp_flags &IGC_PTP_ENABLED ))return ;
Signature · 1 line
2.11.0
PATCH 1/1 igc: Complete to commit Add basic skeleton for PTP
Hi Sasha,
Quoted 2 lines · Sasha Neftin
commit
5f2958052c58("igc: Add basic skeleton for PTP") Add ptp suspend method to theigc_shutdown.
I guess the commit message could use a bit more text, something like this:
"Commit 5f2958052c58 ("igc: Add basic skeleton for PTP") added basic support for PTP, what's missing is support for suspending. By cleaning the runtime storage for timestamp this avoids a possible invalid memory access when the system comes back from suspend."
Apart from that, the code looks good.
Is this the only thing missing for suspend/resume to work? If so, that's cool :-)
Cheers,
--
Vinicius
Neftin
PATCH 1/1 igc: Complete to commit Add basic skeleton for PTP
Quoted 7 lines · Vinicius Costa Gomes
Hi Sasha,
Quoted 2 lines · Sasha Neftin
commit
5f2958052c58("igc: Add basic skeleton for PTP") Add ptp suspend method to theigc_shutdown.
Quoted 7 lines
I guess the commit message could use a bit more text, something like this:
"Commit
5f2958052c58("igc: Add basic skeleton for PTP") added basic support for PTP, what's missing is support for suspending. By cleaning the runtime storage for timestamp this avoids a possible invalid memory access when the system comes back from suspend."
Thanks Vinicius - I will extend the commit message in v2.
Quoted 11 lines
Apart from that, the code looks good.
Is this the only thing missing for suspend/resume to work? If so, that's cool :-)
Cheers,
--
Vinicius