Skip to contentSkip to conversation

igb: properly start/stop PTP during suspend/resume

PATCH New Jacob Keller 2 participants 2 messages May 11, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: properly start/stop PTP during suspend/resume

---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/igb/igb_main.c +4 -0
index 21727692bef6..8f740bc69fc3 100644
@@ -7527,6 +7527,8 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
 	if (netif_running(netdev))
 		__igb_close(netdev, true);
 
+	igb_ptp_stop(adapter);
+
 	igb_clear_interrupt_scheme(adapter);
 
 #ifdef CONFIG_PM
@@ -7637,6 +7639,8 @@ static int igb_resume(struct device *dev)
 		return -ENOMEM;
 	}
 
+	igb_ptp_init(adapter);
+
 	igb_reset(adapter);
 
 	/* let the f/w know that the h/w is now under the control of the
Signature · 1 line
2.8.1.493.g7b22612
#1 lore raw

PATCH 1/1 igb: properly start/stop PTP during suspend/resume

Quoted 27 lines · Jacob Keller

---
?drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++ ?1 file changed, 4 insertions(+)

drivers/net/ethernet/intel/igb/igb_main.c +0 -0
index 21727692bef6..8f740bc69fc3 100644
@@ -7527,6 +7527,8 @@ static int __igb_shutdown(struct pci_dev *pdev,
 bool *enable_wake,
 ?	if (netif_running(netdev))
 ?		__igb_close(netdev, true);

?

drivers/net/ethernet/intel/igb/igb_main.c +2 -0
+	igb_ptp_stop(adapter);
+

? igb_clear_interrupt_scheme(adapter);
?
?#ifdef CONFIG_PM

drivers/net/ethernet/intel/igb/igb_main.c +0 -0
@@ -7637,6 +7639,8 @@ static int igb_resume(struct device *dev)
 ?		return -ENOMEM;
 ?	}

?

drivers/net/ethernet/intel/igb/igb_main.c +2 -0
+	igb_ptp_init(adapter);
+
Quoted 4 lines

? igb_reset(adapter);
?
? /* let the f/w know that the h/w is now under the control of
the

Unfortunately I think this patch is wrong, my first pass at fixing was to do igb_ptp_stop and igb_ptp_init, but this seems like it won't work because we'll actually remove the PHC device, which we don't want to do. I'm going to rework this patch and send a v2.

Thanks,
Jake