All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP
@ 2016-05-24 20:56 Jacob Keller
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jacob Keller
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Jacob Keller @ 2016-05-24 20:56 UTC (permalink / raw)
  To: intel-wired-lan

Upcoming patches will introduce new PTP specific flags. To avoid
cluttering the normal flags variable, introduce PTP specific "ptp_flags"
variable for this purpose, and move IGB_FLAG_PTP to become
IGB_PTP_ENABLED.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/igb/igb.h     | 5 ++++-
 drivers/net/ethernet/intel/igb/igb_ptp.c | 7 ++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index b9609afa5ca3..1e18a9eb16e0 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -445,6 +445,7 @@ struct igb_adapter {
 	unsigned long ptp_tx_start;
 	unsigned long last_rx_ptp_check;
 	unsigned long last_rx_timestamp;
+	unsigned int ptp_flags;
 	spinlock_t tmreg_lock;
 	struct cyclecounter cc;
 	struct timecounter tc;
@@ -474,12 +475,14 @@ struct igb_adapter {
 	u16 eee_advert;
 };
 
+/* flags controlling PTP/1588 function */
+#define IGB_PTP_ENABLED		BIT(0)
+
 #define IGB_FLAG_HAS_MSI		BIT(0)
 #define IGB_FLAG_DCA_ENABLED		BIT(1)
 #define IGB_FLAG_QUAD_PORT_A		BIT(2)
 #define IGB_FLAG_QUEUE_PAIRS		BIT(3)
 #define IGB_FLAG_DMAC			BIT(4)
-#define IGB_FLAG_PTP			BIT(5)
 #define IGB_FLAG_RSS_FIELD_IPV4_UDP	BIT(6)
 #define IGB_FLAG_RSS_FIELD_IPV6_UDP	BIT(7)
 #define IGB_FLAG_WOL_SUPPORTED		BIT(8)
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index f097c5a8ab93..504102ba4bfb 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -684,6 +684,7 @@ void igb_ptp_rx_hang(struct igb_adapter *adapter)
 	u32 tsyncrxctl = rd32(E1000_TSYNCRXCTL);
 	unsigned long rx_event;
 
+	/* Other hardware uses per-packet timestamps */
 	if (hw->mac.type != e1000_82576)
 		return;
 
@@ -1156,7 +1157,7 @@ void igb_ptp_init(struct igb_adapter *adapter)
 	} else {
 		dev_info(&adapter->pdev->dev, "added PHC on %s\n",
 			 adapter->netdev->name);
-		adapter->flags |= IGB_FLAG_PTP;
+		adapter->ptp_flags |= IGB_PTP_ENABLED;
 	}
 }
 
@@ -1194,7 +1195,7 @@ void igb_ptp_stop(struct igb_adapter *adapter)
 		ptp_clock_unregister(adapter->ptp_clock);
 		dev_info(&adapter->pdev->dev, "removed PHC on %s\n",
 			 adapter->netdev->name);
-		adapter->flags &= ~IGB_FLAG_PTP;
+		adapter->ptp_flags &= ~IGB_PTP_ENABLED;
 	}
 }
 
@@ -1209,7 +1210,7 @@ void igb_ptp_reset(struct igb_adapter *adapter)
 	struct e1000_hw *hw = &adapter->hw;
 	unsigned long flags;
 
-	if (!(adapter->flags & IGB_FLAG_PTP))
+	if (!(adapter->ptp_flags & IGB_PTP_ENABLED))
 		return;
 
 	/* reset the tstamp_config */
-- 
2.8.2.820.gd1c5f70


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
@ 2016-05-24 20:56 ` Jacob Keller
  2016-05-27 22:24   ` Brown, Aaron F
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init Jacob Keller
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jacob Keller @ 2016-05-24 20:56 UTC (permalink / raw)
  To: intel-wired-lan

Don't continue to use complex MAC type checks for handling various cases
where we have overflow check code. Make this code more obvious by
introducing a flag which is enabled for hardware that needs these
checks.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/igb/igb.h     |  1 +
 drivers/net/ethernet/intel/igb/igb_ptp.c | 21 ++++++++-------------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 1e18a9eb16e0..38daaaba0cdb 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -477,6 +477,7 @@ struct igb_adapter {
 
 /* flags controlling PTP/1588 function */
 #define IGB_PTP_ENABLED		BIT(0)
+#define IGB_PTP_OVERFLOW_CHECK	BIT(1)
 
 #define IGB_FLAG_HAS_MSI		BIT(0)
 #define IGB_FLAG_DCA_ENABLED		BIT(1)
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 504102ba4bfb..88d367d5a78d 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -1067,6 +1067,7 @@ void igb_ptp_init(struct igb_adapter *adapter)
 		adapter->cc.shift = IGB_82576_TSYNC_SHIFT;
 		/* Dial the nominal frequency. */
 		wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576);
+		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
 		break;
 	case e1000_82580:
 	case e1000_i354:
@@ -1087,6 +1088,7 @@ void igb_ptp_init(struct igb_adapter *adapter)
 		adapter->cc.shift = 0;
 		/* Enable the timer functions by clearing bit 31. */
 		wr32(E1000_TSAUXC, 0x0);
+		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
 		break;
 	case e1000_i210:
 	case e1000_i211:
@@ -1132,7 +1134,9 @@ void igb_ptp_init(struct igb_adapter *adapter)
 	} else {
 		timecounter_init(&adapter->tc, &adapter->cc,
 				 ktime_to_ns(ktime_get_real()));
+	}
 
+	if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK) {
 		INIT_DELAYED_WORK(&adapter->ptp_overflow_work,
 				  igb_ptp_overflow_check);
 
@@ -1169,20 +1173,11 @@ void igb_ptp_init(struct igb_adapter *adapter)
  **/
 void igb_ptp_stop(struct igb_adapter *adapter)
 {
-	switch (adapter->hw.mac.type) {
-	case e1000_82576:
-	case e1000_82580:
-	case e1000_i354:
-	case e1000_i350:
-		cancel_delayed_work_sync(&adapter->ptp_overflow_work);
-		break;
-	case e1000_i210:
-	case e1000_i211:
-		/* No delayed work to cancel. */
-		break;
-	default:
+	if (!(adapter->ptp_flags & IGB_PTP_ENABLED))
 		return;
-	}
+
+	if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK)
+		cancel_delayed_work_sync(&adapter->ptp_overflow_work);
 
 	cancel_work_sync(&adapter->ptp_tx_work);
 	if (adapter->ptp_tx_skb) {
-- 
2.8.2.820.gd1c5f70


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jacob Keller
@ 2016-05-24 20:56 ` Jacob Keller
  2016-05-27 22:24   ` Brown, Aaron F
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend Jacob Keller
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jacob Keller @ 2016-05-24 20:56 UTC (permalink / raw)
  To: intel-wired-lan

Modify igb_ptp_init to take advantage of igb_ptp_reset, and remove
duplicated work that was occurring in both igb_ptp_reset and
igb_ptp_init.

In total, resetting the TSAUXC register, and resetting the system time
both happen in igb_ptp_reset already. igb_ptp_reset now also takes care
of starting the delayed work item for overflow checks, as well.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c |  3 +-
 drivers/net/ethernet/intel/igb/igb_ptp.c  | 48 +++++++++++--------------------
 2 files changed, 18 insertions(+), 33 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 21727692bef6..0321f0884fa0 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2027,7 +2027,8 @@ void igb_reset(struct igb_adapter *adapter)
 	wr32(E1000_VET, ETHERNET_IEEE_VLAN_TYPE);
 
 	/* Re-enable PTP, where applicable. */
-	igb_ptp_reset(adapter);
+	if (adapter->ptp_flags & IGB_PTP_ENABLED)
+		igb_ptp_reset(adapter);
 
 	igb_get_phy_info(hw);
 }
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 88d367d5a78d..907c225d9b20 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -1043,6 +1043,13 @@ int igb_ptp_set_ts_config(struct net_device *netdev, struct ifreq *ifr)
 		-EFAULT : 0;
 }
 
+/**
+ * igb_ptp_init - Initialize PTP functionality
+ * @adapter: Board private structure
+ *
+ * This function is called at device probe to initialize the PTP
+ * functionality.
+ */
 void igb_ptp_init(struct igb_adapter *adapter)
 {
 	struct e1000_hw *hw = &adapter->hw;
@@ -1065,8 +1072,6 @@ void igb_ptp_init(struct igb_adapter *adapter)
 		adapter->cc.mask = CYCLECOUNTER_MASK(64);
 		adapter->cc.mult = 1;
 		adapter->cc.shift = IGB_82576_TSYNC_SHIFT;
-		/* Dial the nominal frequency. */
-		wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576);
 		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
 		break;
 	case e1000_82580:
@@ -1086,8 +1091,6 @@ void igb_ptp_init(struct igb_adapter *adapter)
 		adapter->cc.mask = CYCLECOUNTER_MASK(IGB_NBITS_82580);
 		adapter->cc.mult = 1;
 		adapter->cc.shift = 0;
-		/* Enable the timer functions by clearing bit 31. */
-		wr32(E1000_TSAUXC, 0x0);
 		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
 		break;
 	case e1000_i210:
@@ -1113,46 +1116,24 @@ void igb_ptp_init(struct igb_adapter *adapter)
 		adapter->ptp_caps.settime64 = igb_ptp_settime_i210;
 		adapter->ptp_caps.enable = igb_ptp_feature_enable_i210;
 		adapter->ptp_caps.verify = igb_ptp_verify_pin;
-		/* Enable the timer functions by clearing bit 31. */
-		wr32(E1000_TSAUXC, 0x0);
 		break;
 	default:
 		adapter->ptp_clock = NULL;
 		return;
 	}
 
-	wrfl();
-
 	spin_lock_init(&adapter->tmreg_lock);
 	INIT_WORK(&adapter->ptp_tx_work, igb_ptp_tx_work);
 
-	/* Initialize the clock and overflow work for devices that need it. */
-	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
-		struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
-
-		igb_ptp_settime_i210(&adapter->ptp_caps, &ts);
-	} else {
-		timecounter_init(&adapter->tc, &adapter->cc,
-				 ktime_to_ns(ktime_get_real()));
-	}
-
-	if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK) {
+	if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK)
 		INIT_DELAYED_WORK(&adapter->ptp_overflow_work,
 				  igb_ptp_overflow_check);
 
-		schedule_delayed_work(&adapter->ptp_overflow_work,
-				      IGB_SYSTIM_OVERFLOW_PERIOD);
-	}
-
-	/* Initialize the time sync interrupts for devices that support it. */
-	if (hw->mac.type >= e1000_82580) {
-		wr32(E1000_TSIM, TSYNC_INTERRUPTS);
-		wr32(E1000_IMS, E1000_IMS_TS);
-	}
-
 	adapter->tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
 	adapter->tstamp_config.tx_type = HWTSTAMP_TX_OFF;
 
+	igb_ptp_reset(adapter);
+
 	adapter->ptp_clock = ptp_clock_register(&adapter->ptp_caps,
 						&adapter->pdev->dev);
 	if (IS_ERR(adapter->ptp_clock)) {
@@ -1205,9 +1186,6 @@ void igb_ptp_reset(struct igb_adapter *adapter)
 	struct e1000_hw *hw = &adapter->hw;
 	unsigned long flags;
 
-	if (!(adapter->ptp_flags & IGB_PTP_ENABLED))
-		return;
-
 	/* reset the tstamp_config */
 	igb_ptp_set_timestamp_mode(adapter, &adapter->tstamp_config);
 
@@ -1244,4 +1222,10 @@ void igb_ptp_reset(struct igb_adapter *adapter)
 	}
 out:
 	spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
+
+	wrfl();
+
+	if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK)
+		schedule_delayed_work(&adapter->ptp_overflow_work,
+				      IGB_SYSTIM_OVERFLOW_PERIOD);
 }
-- 
2.8.2.820.gd1c5f70


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jacob Keller
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init Jacob Keller
@ 2016-05-24 20:56 ` Jacob Keller
  2016-05-27 22:24   ` Brown, Aaron F
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle Jacob Keller
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jacob Keller @ 2016-05-24 20:56 UTC (permalink / raw)
  To: intel-wired-lan

Make igb_ptp_stop take advantage of this new function to reduce code
duplication.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/igb/igb.h     |  1 +
 drivers/net/ethernet/intel/igb/igb_ptp.c | 22 +++++++++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 38daaaba0cdb..5387b3a96489 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -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,
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 907c225d9b20..e61b647f5f2a 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -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);
-- 
2.8.2.820.gd1c5f70


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
                   ` (2 preceding siblings ...)
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend Jacob Keller
@ 2016-05-24 20:56 ` Jacob Keller
  2016-05-27 22:25   ` Brown, Aaron F
  2016-05-24 20:57 ` [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Keller, Jacob E
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jacob Keller @ 2016-05-24 20:56 UTC (permalink / raw)
  To: intel-wired-lan

Properly stop the extra workqueue items and ensure that we resume
cleanly. This is better than using igb_ptp_init and igb_ptp_stop since
these functions destroy the PHC device, which will cause other problems
if we do so. Since igb_ptp_reset now re-schedules the work-queue item we
don't need an equivalent igb_ptp_resume in the resume workflow.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 0321f0884fa0..beb3c1dac8af 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7528,6 +7528,8 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
 	if (netif_running(netdev))
 		__igb_close(netdev, true);
 
+	igb_ptp_suspend(adapter);
+
 	igb_clear_interrupt_scheme(adapter);
 
 #ifdef CONFIG_PM
-- 
2.8.2.820.gd1c5f70


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
                   ` (3 preceding siblings ...)
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle Jacob Keller
@ 2016-05-24 20:57 ` Keller, Jacob E
  2016-05-24 23:37 ` Brown, Aaron F
  2016-05-27 22:23 ` Brown, Aaron F
  6 siblings, 0 replies; 13+ messages in thread
From: Keller, Jacob E @ 2016-05-24 20:57 UTC (permalink / raw)
  To: intel-wired-lan

On Tue, 2016-05-24 at 13:56 -0700, Jacob Keller wrote:
> Upcoming patches will introduce new PTP specific flags. To avoid
> cluttering the normal flags variable, introduce PTP specific
> "ptp_flags"
> variable for this purpose, and move IGB_FLAG_PTP to become
> IGB_PTP_ENABLED.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---

For reference, I attached the interseries difference between v3 and v4.

Thanks,
Jake
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interdiff-v3-v4.patch
Type: text/x-patch
Size: 1396 bytes
Desc: interdiff-v3-v4.patch
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160524/a104e891/attachment.bin>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
                   ` (4 preceding siblings ...)
  2016-05-24 20:57 ` [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Keller, Jacob E
@ 2016-05-24 23:37 ` Brown, Aaron F
  2016-05-25 20:08   ` Keller, Jacob E
  2016-05-27 22:23 ` Brown, Aaron F
  6 siblings, 1 reply; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-24 23:37 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:56 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable
> and use it to replace IGB_FLAG_PTP
> 
> Upcoming patches will introduce new PTP specific flags. To avoid
> cluttering the normal flags variable, introduce PTP specific "ptp_flags"
> variable for this purpose, and move IGB_FLAG_PTP to become
> IGB_PTP_ENABLED.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb.h     | 5 ++++-
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 7 ++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 

On a quick check this (v3) series resolves both the issues I described earlier.  All the systems I saw problem on are now happily bouncing ptp4l packets across the wire for more than a minute or two.  Given it would blow up almost immediately before those issues seem to be gone.  Now to put it through the rest of its paces ;)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP
  2016-05-24 23:37 ` Brown, Aaron F
@ 2016-05-25 20:08   ` Keller, Jacob E
  0 siblings, 0 replies; 13+ messages in thread
From: Keller, Jacob E @ 2016-05-25 20:08 UTC (permalink / raw)
  To: intel-wired-lan

On Tue, 2016-05-24 at 23:37 +0000, Brown, Aaron F wrote:
> > 
> > From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.
> > org] On
> > Behalf Of Jacob Keller
> > Sent: Tuesday, May 24, 2016 1:56 PM
> > To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> > Subject: [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags
> > variable
> > and use it to replace IGB_FLAG_PTP
> > 
> > Upcoming patches will introduce new PTP specific flags. To avoid
> > cluttering the normal flags variable, introduce PTP specific
> > "ptp_flags"
> > variable for this purpose, and move IGB_FLAG_PTP to become
> > IGB_PTP_ENABLED.
> > 
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > ---
> > ?drivers/net/ethernet/intel/igb/igb.h?????| 5 ++++-
> > ?drivers/net/ethernet/intel/igb/igb_ptp.c | 7 ++++---
> > ?2 files changed, 8 insertions(+), 4 deletions(-)
> > 
> On a quick check this (v3) series resolves both the issues I
> described earlier.??All the systems I saw problem on are now happily
> bouncing ptp4l packets across the wire for more than a minute or
> two.??Given it would blow up almost immediately before those issues
> seem to be gone.??Now to put it through the rest of its paces ;)

Thanks.

Regards,
Jake

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP
  2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
                   ` (5 preceding siblings ...)
  2016-05-24 23:37 ` Brown, Aaron F
@ 2016-05-27 22:23 ` Brown, Aaron F
  6 siblings, 0 replies; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-27 22:23 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:56 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable
> and use it to replace IGB_FLAG_PTP
> 
> Upcoming patches will introduce new PTP specific flags. To avoid
> cluttering the normal flags variable, introduce PTP specific "ptp_flags"
> variable for this purpose, and move IGB_FLAG_PTP to become
> IGB_PTP_ENABLED.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb.h     | 5 ++++-
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 7 ++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jacob Keller
@ 2016-05-27 22:24   ` Brown, Aaron F
  0 siblings, 0 replies; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-27 22:24 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:56 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 2/5] igb: introduce
> IGB_PTP_OVERFLOW_CHECK flag
> 
> Don't continue to use complex MAC type checks for handling various cases
> where we have overflow check code. Make this code more obvious by
> introducing a flag which is enabled for hardware that needs these
> checks.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb.h     |  1 +
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 21 ++++++++-------------
>  2 files changed, 9 insertions(+), 13 deletions(-)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init Jacob Keller
@ 2016-05-27 22:24   ` Brown, Aaron F
  0 siblings, 0 replies; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-27 22:24 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:56 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in
> igb_ptp_init
> 
> Modify igb_ptp_init to take advantage of igb_ptp_reset, and remove
> duplicated work that was occurring in both igb_ptp_reset and
> igb_ptp_init.
> 
> In total, resetting the TSAUXC register, and resetting the system time
> both happen in igb_ptp_reset already. igb_ptp_reset now also takes care
> of starting the delayed work item for overflow checks, as well.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |  3 +-
>  drivers/net/ethernet/intel/igb/igb_ptp.c  | 48 +++++++++++--------------------
>  2 files changed, 18 insertions(+), 33 deletions(-)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend Jacob Keller
@ 2016-05-27 22:24   ` Brown, Aaron F
  0 siblings, 0 replies; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-27 22:24 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:57 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 4/5] 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>
> ---
>  drivers/net/ethernet/intel/igb/igb.h     |  1 +
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 22 +++++++++++++++++-----
>  2 files changed, 18 insertions(+), 5 deletions(-)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle
  2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle Jacob Keller
@ 2016-05-27 22:25   ` Brown, Aaron F
  0 siblings, 0 replies; 13+ messages in thread
From: Brown, Aaron F @ 2016-05-27 22:25 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Tuesday, May 24, 2016 1:57 PM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during
> suspend/resume cycle
> 
> Properly stop the extra workqueue items and ensure that we resume
> cleanly. This is better than using igb_ptp_init and igb_ptp_stop since
> these functions destroy the PHC device, which will cause other problems
> if we do so. Since igb_ptp_reset now re-schedules the work-queue item we
> don't need an equivalent igb_ptp_resume in the resume workflow.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-05-27 22:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 20:56 [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jacob Keller
2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 2/5] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jacob Keller
2016-05-27 22:24   ` Brown, Aaron F
2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 3/5] igb: re-use igb_ptp_reset in igb_ptp_init Jacob Keller
2016-05-27 22:24   ` Brown, Aaron F
2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 4/5] igb: implement igb_ptp_suspend Jacob Keller
2016-05-27 22:24   ` Brown, Aaron F
2016-05-24 20:56 ` [Intel-wired-lan] [PATCH v4 5/5] igb: call igb_ptp_suspend during suspend/resume cycle Jacob Keller
2016-05-27 22:25   ` Brown, Aaron F
2016-05-24 20:57 ` [Intel-wired-lan] [PATCH v4 1/5] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Keller, Jacob E
2016-05-24 23:37 ` Brown, Aaron F
2016-05-25 20:08   ` Keller, Jacob E
2016-05-27 22:23 ` Brown, Aaron F

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.