* [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers
@ 2014-03-14 17:34 Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt Jakub Kicinski
` (9 more replies)
0 siblings, 10 replies; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
This series is mostly about fixing two things:
- when user space request both SW and HW time stamps
only one of them should be generated (SW is fallback
to HW). Intel drivers would report two time stamps
per packet which may be confusing to user space app;
- all(?) Intel drivers have one set of PTP TX registers
per NIC so drivers with multiple TX rings need some
kind of mutual exclusion otherwise they will leak skbs
These apply to igb, ixgbe and i40e.
Apart from that I added timeout for time stamp checking
in e1000e and removed 'if' clause that cannot be triggered.
NOTE: I do not own any igb or i40e devices. Patches 7-10
were only compile-tested!
Also I think that there is a race between time stamp
polling work and calling i40e_ptp_tx_hwtstamp() directly
from interrupt in i40e, but as I said I don't have any
device to test that.
-- Jakub Kicinski
Jakub Kicinski (10):
doc: update driver TX algorithm in timestamping.txt
e1000e: add timeout for TX HW time stamping work
e1000e: remove redundant if clause from PTP work
ixgbe: remove redundant if clause from PTP work
ixgbe: never generate both software and hardware timestamps
ixgbe: fix race conditions on queuing skb for HW time stamp
igb: never generate both software and hardware timestamps
igb: fix race conditions on queuing skb for HW time stamp
i40e: never generate both software and hardware timestamps
i40e: fix race conditions on queuing skb for HW time stamp
Documentation/networking/timestamping.txt | 6 +++---
drivers/net/ethernet/intel/e1000e/e1000.h | 2 ++
drivers/net/ethernet/intel/e1000e/ethtool.c | 1 +
drivers/net/ethernet/intel/e1000e/netdev.c | 10 +++++++---
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +++
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++++---
drivers/net/ethernet/intel/igb/igb.h | 3 ++-
drivers/net/ethernet/intel/igb/igb_main.c | 7 ++++---
drivers/net/ethernet/intel/igb/igb_ptp.c | 3 +++
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 +++++---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 7 +++----
13 files changed, 39 insertions(+), 20 deletions(-)
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 19:12 ` Sergei Shtylyov
2014-03-14 17:34 ` [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work Jakub Kicinski
` (8 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, linux-doc, e1000-devel
Since cd4d8fdad1f1 dev_hard_start_xmit() will not provide
software timestamps. It's a responsibility of the drivers
to call skb_tx_timestamp() at the right time.
Cc: linux-doc@vger.kernel.org
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
Documentation/networking/timestamping.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 661d3c3..e0f259c 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -190,6 +190,9 @@ Time stamps for outgoing packets are to be generated as follows:
and not free the skb. A driver not supporting hardware time stamping doesn't
do that. A driver must never touch sk_buff::tstamp! It is used to store
software generated time stamps by the network subsystem.
+- Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
+ as possible. skb_tx_timestamp() provides a software time stamp if requested
+ and hardware timestamping is not possible (SKBTX_IN_PROGRESS not set).
- As soon as the driver has sent the packet and/or obtained a
hardware time stamp for it, it passes the time stamp back by
calling skb_hwtstamp_tx() with the original skb, the raw
@@ -200,6 +203,3 @@ Time stamps for outgoing packets are to be generated as follows:
this would occur at a later time in the processing pipeline than other
software time stamping and therefore could lead to unexpected deltas
between time stamps.
-- If the driver did not set the SKBTX_IN_PROGRESS flag (see above), then
- dev_hard_start_xmit() checks whether software time stamping
- is wanted as fallback and potentially generates the time stamp.
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 17:48 ` Joe Perches
2014-03-14 23:20 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work Jakub Kicinski
` (7 subsequent siblings)
9 siblings, 2 replies; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
Hardware may fail to report time stamp e.g.:
- when hardware time stamping is not enabled
- when time stamp is requested shortly after ifup
Timeout time stamp reading work to prevent it from
scheduling itself indefinitely. Report timeout events
via system log and device stats.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/e1000e/e1000.h | 2 ++
drivers/net/ethernet/intel/e1000e/ethtool.c | 1 +
drivers/net/ethernet/intel/e1000e/netdev.c | 7 +++++++
3 files changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 5325e3e..1471c54 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -262,6 +262,7 @@ struct e1000_adapter {
u32 tx_head_addr;
u32 tx_fifo_size;
u32 tx_dma_failed;
+ u32 tx_hwtstamp_timeouts;
/* Rx */
bool (*clean_rx) (struct e1000_ring *ring, int *work_done,
@@ -334,6 +335,7 @@ struct e1000_adapter {
struct hwtstamp_config hwtstamp_config;
struct delayed_work systim_overflow_work;
struct sk_buff *tx_hwtstamp_skb;
+ unsigned long tx_hwtstamp_start;
struct work_struct tx_hwtstamp_work;
spinlock_t systim_lock; /* protects SYSTIML/H regsters */
struct cyclecounter cc;
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
index 3c2898d..cad250b 100644
--- a/drivers/net/ethernet/intel/e1000e/ethtool.c
+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
@@ -104,6 +104,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
E1000_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
E1000_STAT("uncorr_ecc_errors", uncorr_errors),
E1000_STAT("corr_ecc_errors", corr_errors),
+ E1000_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
};
#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 3f044e7..ccdc977 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
adapter->tx_hwtstamp_skb = NULL;
+ } else if (time_after(jiffies, adapter->tx_hwtstamp_start
+ + adapter->tx_timeout_factor * HZ)) {
+ dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
+ adapter->tx_hwtstamp_skb = NULL;
+ adapter->tx_hwtstamp_timeouts++;
+ e_warn("clearing Tx timestamp hang");
} else {
/* reschedule to check later */
schedule_work(&adapter->tx_hwtstamp_work);
@@ -5545,6 +5551,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
tx_flags |= E1000_TX_FLAGS_HWTSTAMP;
adapter->tx_hwtstamp_skb = skb_get(skb);
+ adapter->tx_hwtstamp_start = jiffies;
schedule_work(&adapter->tx_hwtstamp_work);
} else {
skb_tx_timestamp(skb);
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 04/10] ixgbe: " Jakub Kicinski
` (6 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
tx_hwtstamp_skb is always set before work is scheduled,
work is cancelled before tx_hwtstamp_skb is set to NULL.
PTP work cannot ever see tx_hwtstamp_skb set to NULL.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index ccdc977..d6dd392 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1140,9 +1140,6 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
tx_hwtstamp_work);
struct e1000_hw *hw = &adapter->hw;
- if (!adapter->tx_hwtstamp_skb)
- return;
-
if (er32(TSYNCTXCTL) & E1000_TSYNCTXCTL_VALID) {
struct skb_shared_hwtstamps shhwtstamps;
u64 txstmp;
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 04/10] ixgbe: remove redundant if clause from PTP work
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (2 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps Jakub Kicinski
` (5 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
ptp_tx_skb is always set before work is scheduled,
work is cancelled before ptp_tx_skb is set to NULL.
PTP work cannot ever see ptp_tx_skb set to NULL.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 44ac9ae..8b527d7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -512,10 +512,6 @@ static void ixgbe_ptp_tx_hwtstamp_work(struct work_struct *work)
IXGBE_PTP_TX_TIMEOUT);
u32 tsynctxctl;
- /* we have to have a valid skb */
- if (!adapter->ptp_tx_skb)
- return;
-
if (timeout) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (3 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 04/10] ixgbe: " Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
` (4 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.
Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 851c413..f6ac11c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7031,8 +7031,6 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
tx_flags |= IXGBE_TX_FLAGS_SW_VLAN;
}
- skb_tx_timestamp(skb);
-
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
tx_flags |= IXGBE_TX_FLAGS_TSTAMP;
@@ -7043,6 +7041,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
schedule_work(&adapter->ptp_tx_work);
}
+ skb_tx_timestamp(skb);
+
#ifdef CONFIG_PCI_IOV
/*
* Use the l2switch_enable flag - would be false if the DMA
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (4 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 07/10] igb: never generate both software and hardware timestamps Jakub Kicinski
` (3 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
ixgbe has a single set of TX time stamping resources per NIC.
Use a simple bit lock to avoid race conditions and leaking skbs
when multiple TX rings try to claim time stamping.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +++-
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 2fff0fc..26d27aa 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -812,6 +812,7 @@ enum ixgbe_state_t {
__IXGBE_SERVICE_SCHED,
__IXGBE_IN_SFP_INIT,
__IXGBE_PTP_RUNNING,
+ __IXGBE_PTP_TX_IN_PROGRESS,
};
struct ixgbe_cb {
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index f6ac11c..42aa708 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7031,7 +7031,9 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
tx_flags |= IXGBE_TX_FLAGS_SW_VLAN;
}
- if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
+ if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP &&
+ !test_and_set_bit_lock(__IXGBE_PTP_TX_IN_PROGRESS,
+ &adapter->state))) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
tx_flags |= IXGBE_TX_FLAGS_TSTAMP;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 8b527d7..63515a6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -493,6 +493,7 @@ static void ixgbe_ptp_tx_hwtstamp(struct ixgbe_adapter *adapter)
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IXGBE_PTP_TX_IN_PROGRESS, &adapter->state);
}
/**
@@ -515,6 +516,7 @@ static void ixgbe_ptp_tx_hwtstamp_work(struct work_struct *work)
if (timeout) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IXGBE_PTP_TX_IN_PROGRESS, &adapter->state);
e_warn(drv, "clearing Tx Timestamp hang");
return;
}
@@ -925,6 +927,7 @@ void ixgbe_ptp_stop(struct ixgbe_adapter *adapter)
if (adapter->ptp_tx_skb) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IXGBE_PTP_TX_IN_PROGRESS, &adapter->state);
}
if (adapter->ptp_clock) {
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 07/10] igb: never generate both software and hardware timestamps
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (5 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
` (2 subsequent siblings)
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.
Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 340a344..ee9a482 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4946,8 +4946,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
first->bytecount = skb->len;
first->gso_segs = 1;
- skb_tx_timestamp(skb);
-
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
@@ -4962,6 +4960,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
}
}
+ skb_tx_timestamp(skb);
+
if (vlan_tx_tag_present(skb)) {
tx_flags |= IGB_TX_FLAGS_VLAN;
tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (6 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 07/10] igb: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 10/10] i40e: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
igb has a single set of TX time stamping resources per NIC.
Use a simple bit lock to avoid race conditions and leaking skbs
when multiple TX rings try to claim time stamping.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/igb/igb.h | 3 ++-
drivers/net/ethernet/intel/igb/igb_main.c | 3 ++-
drivers/net/ethernet/intel/igb/igb_ptp.c | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index a202c96..bb2298f 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -491,7 +491,8 @@ struct igb_adapter {
enum e1000_state_t {
__IGB_TESTING,
__IGB_RESETTING,
- __IGB_DOWN
+ __IGB_DOWN,
+ __IGB_PTP_TX_IN_PROGRESS,
};
enum igb_boards {
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index ee9a482..fb9db6e 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4949,7 +4949,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
- if (!(adapter->ptp_tx_skb)) {
+ if (!test_and_set_bit_lock(__IGB_PTP_TX_IN_PROGRESS,
+ &adapter->state)) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
tx_flags |= IGB_TX_FLAGS_TSTAMP;
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 9c9c141..2a83098 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -387,6 +387,7 @@ static void igb_ptp_tx_work(struct work_struct *work)
IGB_PTP_TX_TIMEOUT)) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
adapter->tx_hwtstamp_timeouts++;
dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang");
return;
@@ -480,6 +481,7 @@ static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter)
skb_tstamp_tx(adapter->ptp_tx_skb, &shhwtstamps);
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
}
/**
@@ -842,6 +844,7 @@ void igb_ptp_stop(struct igb_adapter *adapter)
if (adapter->ptp_tx_skb) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
+ clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
}
if (adapter->ptp_clock) {
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (7 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 10/10] i40e: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
9 siblings, 1 reply; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.
Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 2081bdb..9543683 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2167,13 +2167,13 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
else if (tso)
tx_flags |= I40E_TX_FLAGS_TSO;
- skb_tx_timestamp(skb);
-
tsyn = i40e_tsyn(tx_ring, skb, tx_flags, &cd_type_cmd_tso_mss);
if (tsyn)
tx_flags |= I40E_TX_FLAGS_TSYN;
+ skb_tx_timestamp(skb);
+
/* always enable CRC insertion offload */
td_cmd |= I40E_TX_DESC_CMD_ICRC;
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH net-next 10/10] i40e: fix race conditions on queuing skb for HW time stamp
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
` (8 preceding siblings ...)
2014-03-14 17:34 ` [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 17:34 ` Jakub Kicinski
9 siblings, 0 replies; 25+ messages in thread
From: Jakub Kicinski @ 2014-03-14 17:34 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Jakub Kicinski, netdev, e1000-devel
i40e has a single set of TX time stamping resources per NIC.
Use a simple bit lock to avoid race conditions and leaking skbs
when multiple TX rings try to claim time stamping.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +++
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 838b69b..7ed0303 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -136,6 +136,7 @@ enum i40e_state_t {
__I40E_EMP_RESET_REQUESTED,
__I40E_FILTER_OVERFLOW_PROMISC,
__I40E_SUSPENDED,
+ __I40E_PTP_TX_IN_PROGRESS,
};
enum i40e_interrupt_policy {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index e33ec6c..545079c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -238,6 +238,7 @@ static void i40e_ptp_tx_work(struct work_struct *work)
I40E_PTP_TX_TIMEOUT)) {
dev_kfree_skb_any(pf->ptp_tx_skb);
pf->ptp_tx_skb = NULL;
+ clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, &pf->state);
pf->tx_hwtstamp_timeouts++;
dev_warn(&pf->pdev->dev, "clearing Tx timestamp hang");
return;
@@ -350,6 +351,7 @@ void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf)
skb_tstamp_tx(pf->ptp_tx_skb, &shhwtstamps);
dev_kfree_skb_any(pf->ptp_tx_skb);
pf->ptp_tx_skb = NULL;
+ clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, &pf->state);
}
/**
@@ -651,6 +653,7 @@ void i40e_ptp_stop(struct i40e_pf *pf)
if (pf->ptp_tx_skb) {
dev_kfree_skb_any(pf->ptp_tx_skb);
pf->ptp_tx_skb = NULL;
+ clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, &pf->state);
}
if (pf->ptp_clock) {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 9543683..9db6efa 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1746,7 +1746,8 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
* we are not already transmitting a packet to be timestamped
*/
pf = i40e_netdev_to_pf(tx_ring->netdev);
- if (pf->ptp_tx && !pf->ptp_tx_skb) {
+ if (pf->ptp_tx &&
+ !test_and_set_bit_lock(__I40E_PTP_TX_IN_PROGRESS, &pf->state)) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
pf->ptp_tx_skb = skb_get(skb);
} else {
--
1.8.5.3
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 17:34 ` [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work Jakub Kicinski
@ 2014-03-14 17:48 ` Joe Perches
2014-03-14 18:02 ` Jakub Kiciński
2014-03-14 23:20 ` Jeff Kirsher
1 sibling, 1 reply; 25+ messages in thread
From: Joe Perches @ 2014-03-14 17:48 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: e1000-devel, netdev
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> Hardware may fail to report time stamp e.g.:
> - when hardware time stamping is not enabled
> - when time stamp is requested shortly after ifup
trivia:
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
[]
> @@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
> skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
> dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> adapter->tx_hwtstamp_skb = NULL;
> + } else if (time_after(jiffies, adapter->tx_hwtstamp_start
> + + adapter->tx_timeout_factor * HZ)) {
> + dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> + adapter->tx_hwtstamp_skb = NULL;
> + adapter->tx_hwtstamp_timeouts++;
> + e_warn("clearing Tx timestamp hang");
Missing \n termination
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 17:48 ` Joe Perches
@ 2014-03-14 18:02 ` Jakub Kiciński
2014-03-14 18:44 ` Joe Perches
0 siblings, 1 reply; 25+ messages in thread
From: Jakub Kiciński @ 2014-03-14 18:02 UTC (permalink / raw)
To: Joe Perches; +Cc: Jeff Kirsher, netdev, e1000-devel
On Fri, 14 Mar 2014 10:48:37 -0700, Joe Perches wrote:
> On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> > Hardware may fail to report time stamp e.g.:
> > - when hardware time stamping is not enabled
> > - when time stamp is requested shortly after ifup
>
> trivia:
>
> > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> []
> > @@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
> > skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
> > dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > adapter->tx_hwtstamp_skb = NULL;
> > + } else if (time_after(jiffies, adapter->tx_hwtstamp_start
> > + + adapter->tx_timeout_factor * HZ)) {
> > + dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > + adapter->tx_hwtstamp_skb = NULL;
> > + adapter->tx_hwtstamp_timeouts++;
> > + e_warn("clearing Tx timestamp hang");
>
> Missing \n termination
I copied that line from ixgbe and assumed that the magic macro adds
termination...
I see that igb and i40e also lack the \n on similar messages. Can I fix
them all in a single follow-up patch?
Thanks for catching this.
-- kuba
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 18:02 ` Jakub Kiciński
@ 2014-03-14 18:44 ` Joe Perches
2014-03-14 19:14 ` Joe Perches
2014-03-14 19:16 ` Jakub Kiciński
0 siblings, 2 replies; 25+ messages in thread
From: Joe Perches @ 2014-03-14 18:44 UTC (permalink / raw)
To: Jakub Kiciński; +Cc: Jeff Kirsher, netdev, e1000-devel
On Fri, 2014-03-14 at 19:02 +0100, Jakub Kiciński wrote:
> On Fri, 14 Mar 2014 10:48:37 -0700, Joe Perches wrote:
> > On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> > > Hardware may fail to report time stamp e.g.:
> > > - when hardware time stamping is not enabled
> > > - when time stamp is requested shortly after ifup
> >
> > trivia:
> >
> > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> > []
> > > @@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
> > > skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
> > > dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > adapter->tx_hwtstamp_skb = NULL;
> > > + } else if (time_after(jiffies, adapter->tx_hwtstamp_start
> > > + + adapter->tx_timeout_factor * HZ)) {
> > > + dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > + adapter->tx_hwtstamp_skb = NULL;
> > > + adapter->tx_hwtstamp_timeouts++;
> > > + e_warn("clearing Tx timestamp hang");
> >
> > Missing \n termination
>
> I copied that line from ixgbe and assumed that the magic macro adds
> termination...
>
> I see that igb and i40e also lack the \n on similar messages.
There's a bunch of them.
> Can I fix
> them all in a single follow-up patch?
There are also a bunch of _dbg messages that lack that
\n and those seem to be function tracing uses that should
just be deleted.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt
2014-03-14 17:34 ` [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt Jakub Kicinski
@ 2014-03-14 19:12 ` Sergei Shtylyov
0 siblings, 0 replies; 25+ messages in thread
From: Sergei Shtylyov @ 2014-03-14 19:12 UTC (permalink / raw)
To: Jakub Kicinski, Jeff Kirsher; +Cc: e1000-devel, netdev, linux-doc
Hello.
On 03/14/2014 08:34 PM, Jakub Kicinski wrote:
> Since cd4d8fdad1f1 dev_hard_start_xmit() will not provide
Please also specify that commit's summary line in parens.
> software timestamps. It's a responsibility of the drivers
> to call skb_tx_timestamp() at the right time.
> Cc: linux-doc@vger.kernel.org
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
WBR, Sergei
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 18:44 ` Joe Perches
@ 2014-03-14 19:14 ` Joe Perches
2014-03-14 19:16 ` Jakub Kiciński
1 sibling, 0 replies; 25+ messages in thread
From: Joe Perches @ 2014-03-14 19:14 UTC (permalink / raw)
To: Jakub Kiciński; +Cc: Jeff Kirsher, netdev, e1000-devel
On Fri, 2014-03-14 at 11:44 -0700, Joe Perches wrote:
> On Fri, 2014-03-14 at 19:02 +0100, Jakub Kiciński wrote:
> > On Fri, 14 Mar 2014 10:48:37 -0700, Joe Perches wrote:
> > > On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> > > > Hardware may fail to report time stamp e.g.:
> > > > - when hardware time stamping is not enabled
> > > > - when time stamp is requested shortly after ifup
> > >
> > > trivia:
> > >
> > > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> > > []
> > > > @@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
> > > > skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
> > > > dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > > adapter->tx_hwtstamp_skb = NULL;
> > > > + } else if (time_after(jiffies, adapter->tx_hwtstamp_start
> > > > + + adapter->tx_timeout_factor * HZ)) {
> > > > + dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > > + adapter->tx_hwtstamp_skb = NULL;
> > > > + adapter->tx_hwtstamp_timeouts++;
> > > > + e_warn("clearing Tx timestamp hang");
> > >
> > > Missing \n termination
> >
> > I copied that line from ixgbe and assumed that the magic macro adds
> > termination...
> >
> > I see that igb and i40e also lack the \n on similar messages.
>
> There's a bunch of them.
>
> > Can I fix
> > them all in a single follow-up patch?
>
> There are also a bunch of _dbg messages that lack that
> \n and those seem to be function tracing uses that should
> just be deleted.
Maybe something this
Add missing newlines to e_<level> uses
Coalesce formats, add missing spaces to coalesced formats
Align arguments
Remove function tracing uses of e_dbg
Remove some unnecessary parentheses in these e_<level>
Fix speed/duplex debugging messages
Remove unnecessary periods
---
drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 20 +--
drivers/net/ethernet/intel/e1000/e1000_hw.c | 202 ++++-------------------
drivers/net/ethernet/intel/e1000/e1000_main.c | 21 +--
drivers/net/ethernet/intel/e1000e/80003es2lan.c | 8 +-
drivers/net/ethernet/intel/e1000e/82571.c | 6 +-
drivers/net/ethernet/intel/e1000e/ethtool.c | 8 +-
drivers/net/ethernet/intel/e1000e/ich8lan.c | 18 +-
drivers/net/ethernet/intel/e1000e/mac.c | 48 +++---
drivers/net/ethernet/intel/e1000e/manage.c | 6 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 14 +-
drivers/net/ethernet/intel/e1000e/nvm.c | 4 +-
drivers/net/ethernet/intel/e1000e/phy.c | 27 ++-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 24 ++-
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 52 +++---
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +-
18 files changed, 155 insertions(+), 316 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index 73a8aee..056fb2c 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -690,8 +690,7 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg,
writel(write & test[i], address);
read = readl(address);
if (read != (write & test[i] & mask)) {
- e_err(drv, "pattern test reg %04X failed: "
- "got 0x%08X expected 0x%08X\n",
+ e_err(drv, "pattern test reg %04X failed: got 0x%08X expected 0x%08X\n",
reg, read, (write & test[i] & mask));
*data = reg;
return true;
@@ -710,8 +709,7 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg,
writel(write & mask, address);
read = readl(address);
if ((read & mask) != (write & mask)) {
- e_err(drv, "set/check reg %04X test failed: "
- "got 0x%08X expected 0x%08X\n",
+ e_err(drv, "set/check reg %04X test failed: got 0x%08X expected 0x%08X\n",
reg, (read & mask), (write & mask));
*data = reg;
return true;
@@ -755,8 +753,8 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
ew32(STATUS, toggle);
after = er32(STATUS) & toggle;
if (value != after) {
- e_err(drv, "failed STATUS register test got: "
- "0x%08X expected: 0x%08X\n", after, value);
+ e_err(drv, "failed STATUS register test got: 0x%08X expected: 0x%08X\n",
+ after, value);
*data = 1;
return 1;
}
@@ -867,8 +865,8 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
*data = 1;
return -1;
}
- e_info(hw, "testing %s interrupt\n", (shared_int ?
- "shared" : "unshared"));
+ e_info(hw, "testing %s interrupt\n",
+ shared_int ? "shared" : "unshared");
/* Disable all the interrupts */
ew32(IMC, 0xFFFFFFFF);
@@ -1685,8 +1683,7 @@ static void e1000_get_wol(struct net_device *netdev,
wol->supported &= ~WAKE_UCAST;
if (adapter->wol & E1000_WUFC_EX)
- e_err(drv, "Interface does not support directed "
- "(unicast) frame wake-up packets\n");
+ e_err(drv, "Interface does not support directed (unicast) frame wake-up packets\n");
break;
default:
break;
@@ -1717,8 +1714,7 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
switch (hw->device_id) {
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
if (wol->wolopts & WAKE_UCAST) {
- e_err(drv, "Interface does not support directed "
- "(unicast) frame wake-up packets\n");
+ e_err(drv, "Interface does not support directed (unicast) frame wake-up packets\n");
return -EOPNOTSUPP;
}
break;
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index 2879b96..832ecf7 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -115,8 +115,6 @@ static DEFINE_SPINLOCK(e1000_phy_lock);
*/
static s32 e1000_set_phy_type(struct e1000_hw *hw)
{
- e_dbg("e1000_set_phy_type");
-
if (hw->mac_type == e1000_undefined)
return -E1000_ERR_PHY_TYPE;
@@ -159,8 +157,6 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
u32 ret_val;
u16 phy_saved_data;
- e_dbg("e1000_phy_init_script");
-
if (hw->phy_init_script) {
msleep(20);
@@ -253,8 +249,6 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
*/
s32 e1000_set_mac_type(struct e1000_hw *hw)
{
- e_dbg("e1000_set_mac_type");
-
switch (hw->device_id) {
case E1000_DEV_ID_82542:
switch (hw->revision_id) {
@@ -365,8 +359,6 @@ void e1000_set_media_type(struct e1000_hw *hw)
{
u32 status;
- e_dbg("e1000_set_media_type");
-
if (hw->mac_type != e1000_82543) {
/* tbi_compatibility is only valid on 82543 */
hw->tbi_compatibility_en = false;
@@ -415,8 +407,6 @@ s32 e1000_reset_hw(struct e1000_hw *hw)
u32 led_ctrl;
s32 ret_val;
- e_dbg("e1000_reset_hw");
-
/* For 82542 (rev 2.0), disable MWI before issuing a device reset */
if (hw->mac_type == e1000_82542_rev2_0) {
e_dbg("Disabling MWI on 82542 rev 2.0\n");
@@ -566,8 +556,6 @@ s32 e1000_init_hw(struct e1000_hw *hw)
u32 mta_size;
u32 ctrl_ext;
- e_dbg("e1000_init_hw");
-
/* Initialize Identification LED */
ret_val = e1000_id_led_init(hw);
if (ret_val) {
@@ -683,8 +671,6 @@ static s32 e1000_adjust_serdes_amplitude(struct e1000_hw *hw)
u16 eeprom_data;
s32 ret_val;
- e_dbg("e1000_adjust_serdes_amplitude");
-
if (hw->media_type != e1000_media_type_internal_serdes)
return E1000_SUCCESS;
@@ -730,8 +716,6 @@ s32 e1000_setup_link(struct e1000_hw *hw)
s32 ret_val;
u16 eeprom_data;
- e_dbg("e1000_setup_link");
-
/* Read and store word 0x0F of the EEPROM. This word contains bits
* that determine the hardware's default PAUSE (flow control) mode,
* a bit that determines whether the HW defaults to enabling or
@@ -848,8 +832,6 @@ static s32 e1000_setup_fiber_serdes_link(struct e1000_hw *hw)
u32 signal = 0;
s32 ret_val;
- e_dbg("e1000_setup_fiber_serdes_link");
-
/* On adapters with a MAC newer than 82544, SWDP 1 will be
* set when the optics detect a signal. On older adapters, it will be
* cleared when there is a signal. This applies to fiber media only.
@@ -1051,8 +1033,6 @@ static s32 e1000_copper_link_preconfig(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_copper_link_preconfig");
-
ctrl = er32(CTRL);
/* With 82543, we need to force speed and duplex on the MAC equal to
* what the PHY speed and duplex configuration is. In addition, we need
@@ -1074,7 +1054,7 @@ static s32 e1000_copper_link_preconfig(struct e1000_hw *hw)
/* Make sure we have a valid PHY */
ret_val = e1000_detect_gig_phy(hw);
if (ret_val) {
- e_dbg("Error, did not detect valid phy.\n");
+ e_dbg("Error, did not detect valid phy\n");
return ret_val;
}
e_dbg("Phy ID = %x\n", hw->phy_id);
@@ -1112,8 +1092,6 @@ static s32 e1000_copper_link_igp_setup(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_copper_link_igp_setup");
-
if (hw->phy_reset_disable)
return E1000_SUCCESS;
@@ -1254,8 +1232,6 @@ static s32 e1000_copper_link_mgp_setup(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_copper_link_mgp_setup");
-
if (hw->phy_reset_disable)
return E1000_SUCCESS;
@@ -1362,8 +1338,6 @@ static s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_copper_link_autoneg");
-
/* Perform some bounds checking on the hw->autoneg_advertised
* parameter. If this variable is zero, then set it to the default.
*/
@@ -1405,8 +1379,7 @@ static s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
if (hw->wait_autoneg_complete) {
ret_val = e1000_wait_autoneg(hw);
if (ret_val) {
- e_dbg
- ("Error while waiting for autoneg to complete\n");
+ e_dbg("Error while waiting for autoneg to complete\n");
return ret_val;
}
}
@@ -1432,7 +1405,6 @@ static s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
static s32 e1000_copper_link_postconfig(struct e1000_hw *hw)
{
s32 ret_val;
- e_dbg("e1000_copper_link_postconfig");
if ((hw->mac_type >= e1000_82544) && (hw->mac_type != e1000_ce4100)) {
e1000_config_collision_dist(hw);
@@ -1473,8 +1445,6 @@ static s32 e1000_setup_copper_link(struct e1000_hw *hw)
u16 i;
u16 phy_data;
- e_dbg("e1000_setup_copper_link");
-
/* Check if it is a valid PHY and set PHY mode if necessary. */
ret_val = e1000_copper_link_preconfig(hw);
if (ret_val)
@@ -1554,8 +1524,6 @@ s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
u16 mii_autoneg_adv_reg;
u16 mii_1000t_ctrl_reg;
- e_dbg("e1000_phy_setup_autoneg");
-
/* Read the MII Auto-Neg Advertisement Register (Address 4). */
ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg);
if (ret_val)
@@ -1610,8 +1578,7 @@ s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
/* We do not allow the Phy to advertise 1000 Mb Half Duplex */
if (hw->autoneg_advertised & ADVERTISE_1000_HALF) {
- e_dbg
- ("Advertise 1000mb Half duplex requested, request denied!\n");
+ e_dbg("Advertise 1000mb Half duplex requested, request denied!\n");
}
/* Do we want to advertise 1000 Mb Full Duplex? */
@@ -1707,8 +1674,6 @@ static s32 e1000_phy_force_speed_duplex(struct e1000_hw *hw)
u16 phy_data;
u16 i;
- e_dbg("e1000_phy_force_speed_duplex");
-
/* Turn off Flow control if we are forcing speed and duplex. */
hw->fc = E1000_FC_NONE;
@@ -1758,13 +1723,13 @@ static s32 e1000_phy_force_speed_duplex(struct e1000_hw *hw)
ctrl |= E1000_CTRL_SPD_100;
mii_ctrl_reg |= MII_CR_SPEED_100;
mii_ctrl_reg &= ~(MII_CR_SPEED_1000 | MII_CR_SPEED_10);
- e_dbg("Forcing 100mb ");
+ e_dbg("Forcing 100mb\n");
} else {
/* Set the 10Mb bit and turn off the 1000Mb and 100Mb bits. */
ctrl &= ~(E1000_CTRL_SPD_1000 | E1000_CTRL_SPD_100);
mii_ctrl_reg |= MII_CR_SPEED_10;
mii_ctrl_reg &= ~(MII_CR_SPEED_1000 | MII_CR_SPEED_100);
- e_dbg("Forcing 10mb ");
+ e_dbg("Forcing 10mb\n");
}
e1000_config_collision_dist(hw);
@@ -1827,7 +1792,7 @@ static s32 e1000_phy_force_speed_duplex(struct e1000_hw *hw)
*/
if (hw->wait_autoneg_complete) {
/* We will wait for autoneg to complete. */
- e_dbg("Waiting for forced speed/duplex link.\n");
+ e_dbg("Waiting for forced speed/duplex link\n");
mii_status_reg = 0;
/* Wait for autoneg to complete or 4.5 seconds to expire */
@@ -1939,8 +1904,6 @@ void e1000_config_collision_dist(struct e1000_hw *hw)
{
u32 tctl, coll_dist;
- e_dbg("e1000_config_collision_dist");
-
if (hw->mac_type < e1000_82543)
coll_dist = E1000_COLLISION_DISTANCE_82542;
else
@@ -1970,8 +1933,6 @@ static s32 e1000_config_mac_to_phy(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_config_mac_to_phy");
-
/* 82544 or newer MAC, Auto Speed Detection takes care of
* MAC speed/duplex configuration.
*/
@@ -2049,8 +2010,6 @@ s32 e1000_force_mac_fc(struct e1000_hw *hw)
{
u32 ctrl;
- e_dbg("e1000_force_mac_fc");
-
/* Get the current configuration of the Device Control Register */
ctrl = er32(CTRL);
@@ -2120,8 +2079,6 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
u16 speed;
u16 duplex;
- e_dbg("e1000_config_fc_after_link_up");
-
/* Check for the case where we have fiber media and auto-neg failed
* so we had to force link. In this case, we need to force the
* configuration of the MAC to match the "fc" parameter.
@@ -2217,11 +2174,10 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
*/
if (hw->original_fc == E1000_FC_FULL) {
hw->fc = E1000_FC_FULL;
- e_dbg("Flow Control = FULL.\n");
+ e_dbg("Flow Control = FULL\n");
} else {
hw->fc = E1000_FC_RX_PAUSE;
- e_dbg
- ("Flow Control = RX PAUSE frames only.\n");
+ e_dbg("Flow Control = RX PAUSE frames only\n");
}
}
/* For receiving PAUSE frames ONLY.
@@ -2238,8 +2194,7 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
(mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR))
{
hw->fc = E1000_FC_TX_PAUSE;
- e_dbg
- ("Flow Control = TX PAUSE frames only.\n");
+ e_dbg("Flow Control = TX PAUSE frames only\n");
}
/* For transmitting PAUSE frames ONLY.
*
@@ -2255,8 +2210,7 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
(mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR))
{
hw->fc = E1000_FC_RX_PAUSE;
- e_dbg
- ("Flow Control = RX PAUSE frames only.\n");
+ e_dbg("Flow Control = RX PAUSE frames only\n");
}
/* Per the IEEE spec, at this point flow control should
* be disabled. However, we want to consider that we
@@ -2284,11 +2238,10 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
hw->original_fc == E1000_FC_TX_PAUSE) ||
hw->fc_strict_ieee) {
hw->fc = E1000_FC_NONE;
- e_dbg("Flow Control = NONE.\n");
+ e_dbg("Flow Control = NONE\n");
} else {
hw->fc = E1000_FC_RX_PAUSE;
- e_dbg
- ("Flow Control = RX PAUSE frames only.\n");
+ e_dbg("Flow Control = RX PAUSE frames only\n");
}
/* Now we need to do one last check... If we auto-
@@ -2298,8 +2251,7 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
ret_val =
e1000_get_speed_and_duplex(hw, &speed, &duplex);
if (ret_val) {
- e_dbg
- ("Error getting link speed and duplex\n");
+ e_dbg("Error getting link speed and duplex\n");
return ret_val;
}
@@ -2311,13 +2263,11 @@ static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw)
*/
ret_val = e1000_force_mac_fc(hw);
if (ret_val) {
- e_dbg
- ("Error forcing flow control settings\n");
+ e_dbg("Error forcing flow control settings\n");
return ret_val;
}
} else {
- e_dbg
- ("Copper PHY and Auto Neg has not completed.\n");
+ e_dbg("Copper PHY and Auto Neg has not completed\n");
}
}
return E1000_SUCCESS;
@@ -2337,8 +2287,6 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
u32 status;
s32 ret_val = E1000_SUCCESS;
- e_dbg("e1000_check_for_serdes_link_generic");
-
ctrl = er32(CTRL);
status = er32(STATUS);
rxcw = er32(RXCW);
@@ -2355,7 +2303,7 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
hw->autoneg_failed = 1;
goto out;
}
- e_dbg("NOT RXing /C/, disable AutoNeg and force link.\n");
+ e_dbg("NOT RXing /C/, disable AutoNeg and force link\n");
/* Disable auto-negotiation in the TXCW register */
ew32(TXCW, (hw->txcw & ~E1000_TXCW_ANE));
@@ -2377,7 +2325,7 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
* and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner.
*/
- e_dbg("RXing /C/, enable AutoNeg and stop forcing link.\n");
+ e_dbg("RXing /C/, enable AutoNeg and stop forcing link\n");
ew32(TXCW, hw->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
@@ -2393,11 +2341,11 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
hw->serdes_has_link = true;
- e_dbg("SERDES: Link up - forced.\n");
+ e_dbg("SERDES: Link up - forced\n");
}
} else {
hw->serdes_has_link = false;
- e_dbg("SERDES: Link down - force failed.\n");
+ e_dbg("SERDES: Link down - force failed\n");
}
}
@@ -2410,16 +2358,14 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
hw->serdes_has_link = true;
- e_dbg("SERDES: Link up - autoneg "
- "completed successfully.\n");
+ e_dbg("SERDES: Link up - autoneg completed successfully\n");
} else {
hw->serdes_has_link = false;
- e_dbg("SERDES: Link down - invalid"
- "codewords detected in autoneg.\n");
+ e_dbg("SERDES: Link down - invalid codewords detected in autoneg\n");
}
} else {
hw->serdes_has_link = false;
- e_dbg("SERDES: Link down - no sync.\n");
+ e_dbg("SERDES: Link down - no sync\n");
}
} else {
hw->serdes_has_link = false;
@@ -2449,8 +2395,6 @@ s32 e1000_check_for_link(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_check_for_link");
-
ctrl = er32(CTRL);
status = er32(STATUS);
@@ -2547,8 +2491,7 @@ s32 e1000_check_for_link(struct e1000_hw *hw)
else {
ret_val = e1000_config_mac_to_phy(hw);
if (ret_val) {
- e_dbg
- ("Error configuring MAC to PHY settings\n");
+ e_dbg("Error configuring MAC to PHY settings\n");
return ret_val;
}
}
@@ -2577,8 +2520,7 @@ s32 e1000_check_for_link(struct e1000_hw *hw)
ret_val =
e1000_get_speed_and_duplex(hw, &speed, &duplex);
if (ret_val) {
- e_dbg
- ("Error getting link speed and duplex\n");
+ e_dbg("Error getting link speed and duplex\n");
return ret_val;
}
if (speed != SPEED_1000) {
@@ -2632,34 +2574,31 @@ s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_get_speed_and_duplex");
-
if (hw->mac_type >= e1000_82543) {
status = er32(STATUS);
if (status & E1000_STATUS_SPEED_1000) {
*speed = SPEED_1000;
- e_dbg("1000 Mbs, ");
} else if (status & E1000_STATUS_SPEED_100) {
*speed = SPEED_100;
- e_dbg("100 Mbs, ");
} else {
*speed = SPEED_10;
- e_dbg("10 Mbs, ");
}
if (status & E1000_STATUS_FD) {
*duplex = FULL_DUPLEX;
- e_dbg("Full Duplex\n");
} else {
*duplex = HALF_DUPLEX;
- e_dbg(" Half Duplex\n");
}
} else {
- e_dbg("1000 Mbs, Full Duplex\n");
*speed = SPEED_1000;
*duplex = FULL_DUPLEX;
}
+ e_dbg("%u Mbs, %s Duplex\n",
+ *speed == SPEED_1000 ? 1000 :
+ *speed == SPEED_100 ? 100 : 10,
+ *duplex == FULL_DUPLEX ? "Full" : "Half");
+
/* IGP01 PHY may advertise full duplex operation after speed downgrade
* even if it is operating at half duplex. Here we set the duplex
* settings to match the duplex in the link partner's capabilities.
@@ -2699,8 +2638,7 @@ static s32 e1000_wait_autoneg(struct e1000_hw *hw)
u16 i;
u16 phy_data;
- e_dbg("e1000_wait_autoneg");
- e_dbg("Waiting for Auto-Neg to complete.\n");
+ e_dbg("Waiting for Auto-Neg to complete\n");
/* We will wait for autoneg to complete or 4.5 seconds to expire. */
for (i = PHY_AUTO_NEG_TIME; i > 0; i--) {
@@ -2866,8 +2804,6 @@ s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 *phy_data)
u32 ret_val;
unsigned long flags;
- e_dbg("e1000_read_phy_reg");
-
spin_lock_irqsave(&e1000_phy_lock, flags);
if ((hw->phy_type == e1000_phy_igp) &&
@@ -2894,8 +2830,6 @@ static s32 e1000_read_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr,
u32 mdic = 0;
const u32 phy_addr = (hw->mac_type == e1000_ce4100) ? hw->phy_addr : 1;
- e_dbg("e1000_read_phy_reg_ex");
-
if (reg_addr > MAX_PHY_REG_ADDRESS) {
e_dbg("PHY Address %d is out of range\n", reg_addr);
return -E1000_ERR_PARAM;
@@ -3008,8 +2942,6 @@ s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 phy_data)
u32 ret_val;
unsigned long flags;
- e_dbg("e1000_write_phy_reg");
-
spin_lock_irqsave(&e1000_phy_lock, flags);
if ((hw->phy_type == e1000_phy_igp) &&
@@ -3036,8 +2968,6 @@ static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr,
u32 mdic = 0;
const u32 phy_addr = (hw->mac_type == e1000_ce4100) ? hw->phy_addr : 1;
- e_dbg("e1000_write_phy_reg_ex");
-
if (reg_addr > MAX_PHY_REG_ADDRESS) {
e_dbg("PHY Address %d is out of range\n", reg_addr);
return -E1000_ERR_PARAM;
@@ -3129,8 +3059,6 @@ s32 e1000_phy_hw_reset(struct e1000_hw *hw)
u32 ctrl, ctrl_ext;
u32 led_ctrl;
- e_dbg("e1000_phy_hw_reset");
-
e_dbg("Resetting Phy...\n");
if (hw->mac_type > e1000_82543) {
@@ -3189,8 +3117,6 @@ s32 e1000_phy_reset(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_phy_reset");
-
switch (hw->phy_type) {
case e1000_phy_igp:
ret_val = e1000_phy_hw_reset(hw);
@@ -3229,8 +3155,6 @@ static s32 e1000_detect_gig_phy(struct e1000_hw *hw)
u16 phy_id_high, phy_id_low;
bool match = false;
- e_dbg("e1000_detect_gig_phy");
-
if (hw->phy_id != 0)
return E1000_SUCCESS;
@@ -3301,7 +3225,6 @@ static s32 e1000_detect_gig_phy(struct e1000_hw *hw)
static s32 e1000_phy_reset_dsp(struct e1000_hw *hw)
{
s32 ret_val;
- e_dbg("e1000_phy_reset_dsp");
do {
ret_val = e1000_write_phy_reg(hw, 29, 0x001d);
@@ -3333,8 +3256,6 @@ static s32 e1000_phy_igp_get_info(struct e1000_hw *hw,
u16 phy_data, min_length, max_length, average;
e1000_rev_polarity polarity;
- e_dbg("e1000_phy_igp_get_info");
-
/* The downshift status is checked only once, after link is established,
* and it stored in the hw->speed_downgraded parameter.
*/
@@ -3414,8 +3335,6 @@ static s32 e1000_phy_m88_get_info(struct e1000_hw *hw,
u16 phy_data;
e1000_rev_polarity polarity;
- e_dbg("e1000_phy_m88_get_info");
-
/* The downshift status is checked only once, after link is established,
* and it stored in the hw->speed_downgraded parameter.
*/
@@ -3487,8 +3406,6 @@ s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_phy_get_info");
-
phy_info->cable_length = e1000_cable_length_undefined;
phy_info->extended_10bt_distance = e1000_10bt_ext_dist_enable_undefined;
phy_info->cable_polarity = e1000_rev_polarity_undefined;
@@ -3527,8 +3444,6 @@ s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info)
s32 e1000_validate_mdi_setting(struct e1000_hw *hw)
{
- e_dbg("e1000_validate_mdi_settings");
-
if (!hw->autoneg && (hw->mdix == 0 || hw->mdix == 3)) {
e_dbg("Invalid MDI setting detected\n");
hw->mdix = 1;
@@ -3551,8 +3466,6 @@ s32 e1000_init_eeprom_params(struct e1000_hw *hw)
s32 ret_val = E1000_SUCCESS;
u16 eeprom_size;
- e_dbg("e1000_init_eeprom_params");
-
switch (hw->mac_type) {
case e1000_82542_rev2_0:
case e1000_82542_rev2_1:
@@ -3770,8 +3683,6 @@ static s32 e1000_acquire_eeprom(struct e1000_hw *hw)
struct e1000_eeprom_info *eeprom = &hw->eeprom;
u32 eecd, i = 0;
- e_dbg("e1000_acquire_eeprom");
-
eecd = er32(EECD);
/* Request EEPROM Access */
@@ -3871,8 +3782,6 @@ static void e1000_release_eeprom(struct e1000_hw *hw)
{
u32 eecd;
- e_dbg("e1000_release_eeprom");
-
eecd = er32(EECD);
if (hw->eeprom.type == e1000_eeprom_spi) {
@@ -3920,8 +3829,6 @@ static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw)
u16 retry_count = 0;
u8 spi_stat_reg;
- e_dbg("e1000_spi_eeprom_ready");
-
/* Read "Status Register" repeatedly until the LSB is cleared. The
* EEPROM will signal that the command has been completed by clearing
* bit 0 of the internal status register. If it's not cleared within
@@ -3974,8 +3881,6 @@ static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words,
struct e1000_eeprom_info *eeprom = &hw->eeprom;
u32 i = 0;
- e_dbg("e1000_read_eeprom");
-
if (hw->mac_type == e1000_ce4100) {
GBE_CONFIG_FLASH_READ(GBE_CONFIG_BASE_VIRT, offset, words,
data);
@@ -3991,8 +3896,8 @@ static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words,
*/
if ((offset >= eeprom->word_size)
|| (words > eeprom->word_size - offset) || (words == 0)) {
- e_dbg("\"words\" parameter out of bounds. Words = %d,"
- "size = %d\n", offset, eeprom->word_size);
+ e_dbg("\"words\" parameter out of bounds. Words = %d, size = %d\n",
+ offset, eeprom->word_size);
return -E1000_ERR_EEPROM;
}
@@ -4076,8 +3981,6 @@ s32 e1000_validate_eeprom_checksum(struct e1000_hw *hw)
u16 checksum = 0;
u16 i, eeprom_data;
- e_dbg("e1000_validate_eeprom_checksum");
-
for (i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) {
if (e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) {
e_dbg("EEPROM Read Error\n");
@@ -4112,8 +4015,6 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw)
u16 checksum = 0;
u16 i, eeprom_data;
- e_dbg("e1000_update_eeprom_checksum");
-
for (i = 0; i < EEPROM_CHECKSUM_REG; i++) {
if (e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) {
e_dbg("EEPROM Read Error\n");
@@ -4154,8 +4055,6 @@ static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words,
struct e1000_eeprom_info *eeprom = &hw->eeprom;
s32 status = 0;
- e_dbg("e1000_write_eeprom");
-
if (hw->mac_type == e1000_ce4100) {
GBE_CONFIG_FLASH_WRITE(GBE_CONFIG_BASE_VIRT, offset, words,
data);
@@ -4205,8 +4104,6 @@ static s32 e1000_write_eeprom_spi(struct e1000_hw *hw, u16 offset, u16 words,
struct e1000_eeprom_info *eeprom = &hw->eeprom;
u16 widx = 0;
- e_dbg("e1000_write_eeprom_spi");
-
while (widx < words) {
u8 write_opcode = EEPROM_WRITE_OPCODE_SPI;
@@ -4274,8 +4171,6 @@ static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, u16 offset,
u16 words_written = 0;
u16 i = 0;
- e_dbg("e1000_write_eeprom_microwire");
-
/* Send the write enable command to the EEPROM (3-bit opcode plus
* 6/8-bit dummy address beginning with 11). It's less work to include
* the 11 of the dummy address as part of the opcode than it is to shift
@@ -4354,8 +4249,6 @@ s32 e1000_read_mac_addr(struct e1000_hw *hw)
u16 offset;
u16 eeprom_data, i;
- e_dbg("e1000_read_mac_addr");
-
for (i = 0; i < NODE_ADDRESS_SIZE; i += 2) {
offset = i >> 1;
if (e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) {
@@ -4394,8 +4287,6 @@ static void e1000_init_rx_addrs(struct e1000_hw *hw)
u32 i;
u32 rar_num;
- e_dbg("e1000_init_rx_addrs");
-
/* Setup the receive address. */
e_dbg("Programming MAC Address into RAR[0]\n");
@@ -4553,8 +4444,6 @@ static s32 e1000_id_led_init(struct e1000_hw *hw)
u16 eeprom_data, i, temp;
const u16 led_mask = 0x0F;
- e_dbg("e1000_id_led_init");
-
if (hw->mac_type < e1000_82540) {
/* Nothing to do */
return E1000_SUCCESS;
@@ -4626,8 +4515,6 @@ s32 e1000_setup_led(struct e1000_hw *hw)
u32 ledctl;
s32 ret_val = E1000_SUCCESS;
- e_dbg("e1000_setup_led");
-
switch (hw->mac_type) {
case e1000_82542_rev2_0:
case e1000_82542_rev2_1:
@@ -4678,8 +4565,6 @@ s32 e1000_cleanup_led(struct e1000_hw *hw)
{
s32 ret_val = E1000_SUCCESS;
- e_dbg("e1000_cleanup_led");
-
switch (hw->mac_type) {
case e1000_82542_rev2_0:
case e1000_82542_rev2_1:
@@ -4714,8 +4599,6 @@ s32 e1000_led_on(struct e1000_hw *hw)
{
u32 ctrl = er32(CTRL);
- e_dbg("e1000_led_on");
-
switch (hw->mac_type) {
case e1000_82542_rev2_0:
case e1000_82542_rev2_1:
@@ -4760,8 +4643,6 @@ s32 e1000_led_off(struct e1000_hw *hw)
{
u32 ctrl = er32(CTRL);
- e_dbg("e1000_led_off");
-
switch (hw->mac_type) {
case e1000_82542_rev2_0:
case e1000_82542_rev2_1:
@@ -4889,8 +4770,6 @@ static void e1000_clear_hw_cntrs(struct e1000_hw *hw)
*/
void e1000_reset_adaptive(struct e1000_hw *hw)
{
- e_dbg("e1000_reset_adaptive");
-
if (hw->adaptive_ifs) {
if (!hw->ifs_params_forced) {
hw->current_ifs_val = 0;
@@ -4917,8 +4796,6 @@ void e1000_reset_adaptive(struct e1000_hw *hw)
*/
void e1000_update_adaptive(struct e1000_hw *hw)
{
- e_dbg("e1000_update_adaptive");
-
if (hw->adaptive_ifs) {
if ((hw->collision_delta *hw->ifs_ratio) > hw->tx_packet_delta) {
if (hw->tx_packet_delta > MIN_NUM_XMITS) {
@@ -5114,8 +4991,6 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
u16 i, phy_data;
u16 cable_length;
- e_dbg("e1000_get_cable_length");
-
*min_length = *max_length = 0;
/* Use old method for Phy older than IGP */
@@ -5231,8 +5106,6 @@ static s32 e1000_check_polarity(struct e1000_hw *hw,
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_check_polarity");
-
if (hw->phy_type == e1000_phy_m88) {
/* return the Polarity bit in the Status register. */
ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS,
@@ -5299,8 +5172,6 @@ static s32 e1000_check_downshift(struct e1000_hw *hw)
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_check_downshift");
-
if (hw->phy_type == e1000_phy_igp) {
ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_LINK_HEALTH,
&phy_data);
@@ -5411,8 +5282,6 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
s32 ret_val;
u16 phy_data, phy_saved_data, speed, duplex, i;
- e_dbg("e1000_config_dsp_after_link_change");
-
if (hw->phy_type != e1000_phy_igp)
return E1000_SUCCESS;
@@ -5546,8 +5415,6 @@ static s32 e1000_set_phy_mode(struct e1000_hw *hw)
s32 ret_val;
u16 eeprom_data;
- e_dbg("e1000_set_phy_mode");
-
if ((hw->mac_type == e1000_82545_rev_3) &&
(hw->media_type == e1000_media_type_copper)) {
ret_val =
@@ -5594,7 +5461,6 @@ static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active)
{
s32 ret_val;
u16 phy_data;
- e_dbg("e1000_set_d3_lplu_state");
if (hw->phy_type != e1000_phy_igp)
return E1000_SUCCESS;
@@ -5699,8 +5565,6 @@ static s32 e1000_set_vco_speed(struct e1000_hw *hw)
u16 default_page = 0;
u16 phy_data;
- e_dbg("e1000_set_vco_speed");
-
switch (hw->mac_type) {
case e1000_82545_rev_3:
case e1000_82546_rev_3:
@@ -5872,7 +5736,6 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)
*/
static s32 e1000_get_auto_rd_done(struct e1000_hw *hw)
{
- e_dbg("e1000_get_auto_rd_done");
msleep(5);
return E1000_SUCCESS;
}
@@ -5887,7 +5750,6 @@ static s32 e1000_get_auto_rd_done(struct e1000_hw *hw)
*/
static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
{
- e_dbg("e1000_get_phy_cfg_done");
msleep(10);
return E1000_SUCCESS;
}
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 46e6544..66c9144 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1537,8 +1537,7 @@ setup_tx_desc_die:
txdr->dma);
dma_free_coherent(&pdev->dev, txdr->size, olddesc,
olddma);
- e_err(probe, "Unable to allocate aligned memory "
- "for the transmit descriptor ring\n");
+ e_err(probe, "Unable to allocate aligned memory for the transmit descriptor ring\n");
vfree(txdr->buffer_info);
return -ENOMEM;
} else {
@@ -1729,8 +1728,7 @@ setup_rx_desc_die:
rxdr->dma);
dma_free_coherent(&pdev->dev, rxdr->size, olddesc,
olddma);
- e_err(probe, "Unable to allocate aligned memory for "
- "the Rx descriptor ring\n");
+ e_err(probe, "Unable to allocate aligned memory for the Rx descriptor ring\n");
goto setup_rx_desc_die;
} else {
/* Free old allocation, new allocation was successful */
@@ -3153,8 +3151,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
/* fall through */
pull_size = min((unsigned int)4, skb->data_len);
if (!__pskb_pull_tail(skb, pull_size)) {
- e_err(drv, "__pskb_pull_tail "
- "failed.\n");
+ e_err(drv, "__pskb_pull_tail failed\n");
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
@@ -3518,7 +3515,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
switch (hw->mac_type) {
case e1000_undefined ... e1000_82542_rev2_1:
if (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
- e_err(probe, "Jumbo Frames not supported.\n");
+ e_err(probe, "Jumbo Frames not supported\n");
return -EINVAL;
}
break;
@@ -4142,7 +4139,7 @@ process_skb:
/* eth type trans needs skb->data to point to something */
if (!pskb_may_pull(skb, ETH_HLEN)) {
- e_err(drv, "pskb_may_pull failed.\n");
+ e_err(drv, "pskb_may_pull failed\n");
dev_kfree_skb(skb);
goto next_desc;
}
@@ -4463,8 +4460,8 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
/* Fix for errata 23, can't cross 64kB boundary */
if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) {
struct sk_buff *oldskb = skb;
- e_err(rx_err, "skb align check failed: %u bytes at "
- "%p\n", bufsz, skb->data);
+ e_err(rx_err, "skb align check failed: %u bytes at %p\n",
+ bufsz, skb->data);
/* Try again, without freeing the previous */
skb = netdev_alloc_skb_ip_align(netdev, bufsz);
/* Failed allocation, critical failure */
@@ -4508,8 +4505,8 @@ map_skb:
if (!e1000_check_64k_bound(adapter,
(void *)(unsigned long)buffer_info->dma,
adapter->rx_buffer_len)) {
- e_err(rx_err, "dma align check failed: %u bytes at "
- "%p\n", adapter->rx_buffer_len,
+ e_err(rx_err, "dma align check failed: %u bytes at %p\n",
+ adapter->rx_buffer_len,
(void *)(unsigned long)buffer_info->dma);
dev_kfree_skb(skb);
buffer_info->skb = NULL;
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
index a5f6b11..56e71d0 100644
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
@@ -313,7 +313,7 @@ static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask)
}
if (i == timeout) {
- e_dbg("Driver can't access resource, SW_FW_SYNC timeout.\n");
+ e_dbg("Driver can't access resource, SW_FW_SYNC timeout\n");
return -E1000_ERR_SWFW_SYNC;
}
@@ -522,7 +522,7 @@ static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw)
timeout--;
}
if (!timeout) {
- e_dbg("MNG configuration cycle has not completed.\n");
+ e_dbg("MNG configuration cycle has not completed\n");
return -E1000_ERR_RESET;
}
@@ -572,7 +572,7 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
udelay(1);
if (hw->phy.autoneg_wait_to_complete) {
- e_dbg("Waiting for forced speed/duplex link on GG82563 phy.\n");
+ e_dbg("Waiting for forced speed/duplex link on GG82563 phy\n");
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
100000, &link);
@@ -689,7 +689,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
*/
ret_val = e1000e_disable_pcie_master(hw);
if (ret_val)
- e_dbg("PCI-E Master disable polling has failed.\n");
+ e_dbg("PCI-E Master disable polling has failed\n");
e_dbg("Masking off all interrupts\n");
ew32(IMC, 0xffffffff);
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
index e0aa7f1..14dbaad 100644
--- a/drivers/net/ethernet/intel/e1000e/82571.c
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
@@ -480,7 +480,7 @@ static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
}
if (i == sw_timeout) {
- e_dbg("Driver can't access device - SMBI bit is set.\n");
+ e_dbg("Driver can't access device - SMBI bit is set\n");
hw->dev_spec.e82571.smb_counter++;
}
/* Get the FW semaphore. */
@@ -875,7 +875,7 @@ static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
timeout--;
}
if (!timeout) {
- e_dbg("MNG configuration cycle has not completed.\n");
+ e_dbg("MNG configuration cycle has not completed\n");
return -E1000_ERR_RESET;
}
@@ -969,7 +969,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
*/
ret_val = e1000e_disable_pcie_master(hw);
if (ret_val)
- e_dbg("PCI-E Master disable polling has failed.\n");
+ e_dbg("PCI-E Master disable polling has failed\n");
e_dbg("Masking off all interrupts\n");
ew32(IMC, 0xffffffff);
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
index 3c2898d..48ffd99 100644
--- a/drivers/net/ethernet/intel/e1000e/ethtool.c
+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
@@ -266,7 +266,7 @@ static int e1000_set_settings(struct net_device *netdev,
*/
if (hw->phy.ops.check_reset_block &&
hw->phy.ops.check_reset_block(hw)) {
- e_err("Cannot change link characteristics when SoL/IDER is active.\n");
+ e_err("Cannot change link characteristics when SoL/IDER is active\n");
ret_val = -EINVAL;
goto out;
}
@@ -1006,7 +1006,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
ret_val = -1;
goto out;
}
- e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared"));
+ e_info("testing %s interrupt\n", shared_int ? "shared" : "unshared");
/* Disable all the interrupts */
ew32(IMC, 0xFFFFFFFF);
@@ -1375,7 +1375,7 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
/* Workaround: K1 must be disabled for stable 1Gbps operation */
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
- e_err("Cannot setup 1Gbps loopback.\n");
+ e_err("Cannot setup 1Gbps loopback\n");
return ret_val;
}
e1000_configure_k1_ich8lan(hw, false);
@@ -1687,7 +1687,7 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data)
/* PHY loopback cannot be performed if SoL/IDER sessions are active */
if (hw->phy.ops.check_reset_block &&
hw->phy.ops.check_reset_block(hw)) {
- e_err("Cannot do PHY loopback test when SoL/IDER is active.\n");
+ e_err("Cannot do PHY loopback test when SoL/IDER is active\n");
*data = 0;
goto out;
}
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 9866f26..3d668b3 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -973,13 +973,13 @@ static s32 e1000_platform_pm_pch_lpt(struct e1000_hw *hw, bool link)
u32 rxa;
if (!hw->adapter->max_frame_size) {
- e_dbg("max_frame_size not set.\n");
+ e_dbg("max_frame_size not set\n");
return -E1000_ERR_CONFIG;
}
hw->mac.ops.get_link_up_info(hw, &speed, &duplex);
if (!speed) {
- e_dbg("Speed not set.\n");
+ e_dbg("Speed not set\n");
return -E1000_ERR_CONFIG;
}
@@ -1543,7 +1543,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
}
if (!timeout) {
- e_dbg("SW has already locked the resource.\n");
+ e_dbg("SW has already locked the resource\n");
ret_val = -E1000_ERR_CONFIG;
goto out;
}
@@ -3030,7 +3030,7 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw)
/* Check if the flash descriptor is valid */
if (!hsfsts.hsf_status.fldesvalid) {
- e_dbg("Flash descriptor invalid. SW Sequencing must be used.\n");
+ e_dbg("Flash descriptor invalid - SW Sequencing must be used\n");
return -E1000_ERR_NVM;
}
@@ -3224,7 +3224,7 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
/* Repeat for some time before giving up. */
continue;
} else if (!hsfsts.hsf_status.flcdone) {
- e_dbg("Timeout error - flash cycle did not complete.\n");
+ e_dbg("Timeout error - flash cycle did not complete\n");
break;
}
}
@@ -3368,7 +3368,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
*/
if (ret_val) {
/* Possibly read-only, see e1000e_write_protect_nvm_ich8lan() */
- e_dbg("Flash commit failed.\n");
+ e_dbg("Flash commit failed\n");
goto release;
}
@@ -3578,7 +3578,7 @@ static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
/* Repeat for some time before giving up. */
continue;
if (!hsfsts.hsf_status.flcdone) {
- e_dbg("Timeout error - flash cycle did not complete.\n");
+ e_dbg("Timeout error - flash cycle did not complete\n");
break;
}
} while (count++ < ICH_FLASH_CYCLE_REPEAT_COUNT);
@@ -3878,7 +3878,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
*/
ret_val = e1000e_disable_pcie_master(hw);
if (ret_val)
- e_dbg("PCI-E Master disable polling has failed.\n");
+ e_dbg("PCI-E Master disable polling has failed\n");
e_dbg("Masking off all interrupts\n");
ew32(IMC, 0xffffffff);
@@ -4412,7 +4412,7 @@ void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
if (hw->mac.type != e1000_ich8lan) {
- e_dbg("Workaround applies to ICH8 only.\n");
+ e_dbg("Workaround applies to ICH8 only\n");
return;
}
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c
index baa0a46..a435305 100644
--- a/drivers/net/ethernet/intel/e1000e/mac.c
+++ b/drivers/net/ethernet/intel/e1000e/mac.c
@@ -493,7 +493,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
mac->autoneg_failed = true;
return 0;
}
- e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
+ e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link\n");
/* Disable auto-negotiation in the TXCW register */
ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE));
@@ -515,7 +515,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner.
*/
- e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link.\n");
+ e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link\n");
ew32(TXCW, mac->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
@@ -556,7 +556,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
mac->autoneg_failed = true;
return 0;
}
- e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
+ e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link\n");
/* Disable auto-negotiation in the TXCW register */
ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE));
@@ -578,7 +578,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner.
*/
- e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link.\n");
+ e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link\n");
ew32(TXCW, mac->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
@@ -594,11 +594,11 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
mac->serdes_has_link = true;
- e_dbg("SERDES: Link up - forced.\n");
+ e_dbg("SERDES: Link up - forced\n");
}
} else {
mac->serdes_has_link = false;
- e_dbg("SERDES: Link down - force failed.\n");
+ e_dbg("SERDES: Link down - force failed\n");
}
}
@@ -611,14 +611,14 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
mac->serdes_has_link = true;
- e_dbg("SERDES: Link up - autoneg completed successfully.\n");
+ e_dbg("SERDES: Link up - autoneg completed successfully\n");
} else {
mac->serdes_has_link = false;
- e_dbg("SERDES: Link down - invalid codewords detected in autoneg.\n");
+ e_dbg("SERDES: Link down - invalid codewords detected in autoneg\n");
}
} else {
mac->serdes_has_link = false;
- e_dbg("SERDES: Link down - no sync.\n");
+ e_dbg("SERDES: Link down - no sync\n");
}
} else {
mac->serdes_has_link = false;
@@ -1054,7 +1054,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
return ret_val;
if (!(mii_status_reg & BMSR_ANEGCOMPLETE)) {
- e_dbg("Copper PHY and Auto Neg has not completed.\n");
+ e_dbg("Copper PHY and Auto Neg has not completed\n");
return ret_val;
}
@@ -1114,10 +1114,10 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
*/
if (hw->fc.requested_mode == e1000_fc_full) {
hw->fc.current_mode = e1000_fc_full;
- e_dbg("Flow Control = FULL.\n");
+ e_dbg("Flow Control = FULL\n");
} else {
hw->fc.current_mode = e1000_fc_rx_pause;
- e_dbg("Flow Control = Rx PAUSE frames only.\n");
+ e_dbg("Flow Control = Rx PAUSE frames only\n");
}
}
/* For receiving PAUSE frames ONLY.
@@ -1132,7 +1132,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
(mii_nway_lp_ability_reg & LPA_PAUSE_CAP) &&
(mii_nway_lp_ability_reg & LPA_PAUSE_ASYM)) {
hw->fc.current_mode = e1000_fc_tx_pause;
- e_dbg("Flow Control = Tx PAUSE frames only.\n");
+ e_dbg("Flow Control = Tx PAUSE frames only\n");
}
/* For transmitting PAUSE frames ONLY.
*
@@ -1146,13 +1146,13 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
!(mii_nway_lp_ability_reg & LPA_PAUSE_CAP) &&
(mii_nway_lp_ability_reg & LPA_PAUSE_ASYM)) {
hw->fc.current_mode = e1000_fc_rx_pause;
- e_dbg("Flow Control = Rx PAUSE frames only.\n");
+ e_dbg("Flow Control = Rx PAUSE frames only\n");
} else {
/* Per the IEEE spec, at this point flow control
* should be disabled.
*/
hw->fc.current_mode = e1000_fc_none;
- e_dbg("Flow Control = NONE.\n");
+ e_dbg("Flow Control = NONE\n");
}
/* Now we need to do one last check... If we auto-
@@ -1191,7 +1191,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
pcs_status_reg = er32(PCS_LSTAT);
if (!(pcs_status_reg & E1000_PCS_LSTS_AN_COMPLETE)) {
- e_dbg("PCS Auto Neg has not completed.\n");
+ e_dbg("PCS Auto Neg has not completed\n");
return ret_val;
}
@@ -1247,10 +1247,10 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
*/
if (hw->fc.requested_mode == e1000_fc_full) {
hw->fc.current_mode = e1000_fc_full;
- e_dbg("Flow Control = FULL.\n");
+ e_dbg("Flow Control = FULL\n");
} else {
hw->fc.current_mode = e1000_fc_rx_pause;
- e_dbg("Flow Control = Rx PAUSE frames only.\n");
+ e_dbg("Flow Control = Rx PAUSE frames only\n");
}
}
/* For receiving PAUSE frames ONLY.
@@ -1265,7 +1265,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
(pcs_lp_ability_reg & E1000_TXCW_PAUSE) &&
(pcs_lp_ability_reg & E1000_TXCW_ASM_DIR)) {
hw->fc.current_mode = e1000_fc_tx_pause;
- e_dbg("Flow Control = Tx PAUSE frames only.\n");
+ e_dbg("Flow Control = Tx PAUSE frames only\n");
}
/* For transmitting PAUSE frames ONLY.
*
@@ -1279,13 +1279,13 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
!(pcs_lp_ability_reg & E1000_TXCW_PAUSE) &&
(pcs_lp_ability_reg & E1000_TXCW_ASM_DIR)) {
hw->fc.current_mode = e1000_fc_rx_pause;
- e_dbg("Flow Control = Rx PAUSE frames only.\n");
+ e_dbg("Flow Control = Rx PAUSE frames only\n");
} else {
/* Per the IEEE spec, at this point flow control
* should be disabled.
*/
hw->fc.current_mode = e1000_fc_none;
- e_dbg("Flow Control = NONE.\n");
+ e_dbg("Flow Control = NONE\n");
}
/* Now we call a subroutine to actually force the MAC
@@ -1380,7 +1380,7 @@ s32 e1000e_get_hw_semaphore(struct e1000_hw *hw)
}
if (i == timeout) {
- e_dbg("Driver can't access device - SMBI bit is set.\n");
+ e_dbg("Driver can't access device - SMBI bit is set\n");
return -E1000_ERR_NVM;
}
@@ -1439,7 +1439,7 @@ s32 e1000e_get_auto_rd_done(struct e1000_hw *hw)
}
if (i == AUTO_READ_DONE_TIMEOUT) {
- e_dbg("Auto read by HW from NVM has not completed.\n");
+ e_dbg("Auto read by HW from NVM has not completed\n");
return -E1000_ERR_RESET;
}
@@ -1723,7 +1723,7 @@ s32 e1000e_disable_pcie_master(struct e1000_hw *hw)
}
if (!timeout) {
- e_dbg("Master requests are pending.\n");
+ e_dbg("Master requests are pending\n");
return -E1000_ERR_MASTER_REQUESTS_PENDING;
}
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c
index cb37ff1..f88365b 100644
--- a/drivers/net/ethernet/intel/e1000e/manage.c
+++ b/drivers/net/ethernet/intel/e1000e/manage.c
@@ -59,14 +59,14 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
u8 i;
if (!hw->mac.arc_subsystem_valid) {
- e_dbg("ARC subsystem not valid.\n");
+ e_dbg("ARC subsystem not valid\n");
return -E1000_ERR_HOST_INTERFACE_COMMAND;
}
/* Check that the host interface is enabled. */
hicr = er32(HICR);
if (!(hicr & E1000_HICR_EN)) {
- e_dbg("E1000_HOST_EN bit disabled.\n");
+ e_dbg("E1000_HOST_EN bit disabled\n");
return -E1000_ERR_HOST_INTERFACE_COMMAND;
}
/* check the previous command is completed */
@@ -78,7 +78,7 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
}
if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) {
- e_dbg("Previous command timeout failed .\n");
+ e_dbg("Previous command timeout failed\n");
return -E1000_ERR_HOST_INTERFACE_COMMAND;
}
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 5129c4c..34a5fbb 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1593,7 +1593,7 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_ring *rx_ring, int *work_done,
/* eth type trans needs skb->data to point to something */
if (!pskb_may_pull(skb, ETH_HLEN)) {
- e_err("pskb_may_pull failed.\n");
+ e_err("pskb_may_pull failed\n");
dev_kfree_skb_irq(skb);
goto next_desc;
}
@@ -2044,7 +2044,7 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
return;
}
/* MSI-X failed, so fall through and try MSI */
- e_err("Failed to initialize MSI-X interrupts. Falling back to MSI interrupts.\n");
+ e_err("Failed to initialize MSI-X interrupts - falling back to MSI interrupts\n");
e1000e_reset_interrupt_capability(adapter);
}
adapter->int_mode = E1000E_INT_MODE_MSI;
@@ -2054,7 +2054,7 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
adapter->flags |= FLAG_MSI_ENABLED;
} else {
adapter->int_mode = E1000E_INT_MODE_LEGACY;
- e_err("Failed to initialize MSI interrupts. Falling back to legacy interrupts.\n");
+ e_err("Failed to initialize MSI interrupts - falling back to legacy interrupts\n");
}
/* Fall through */
case E1000E_INT_MODE_LEGACY:
@@ -4187,7 +4187,7 @@ static int e1000_test_msi_interrupt(struct e1000_adapter *adapter)
if (adapter->flags & FLAG_MSI_TEST_FAILED) {
adapter->int_mode = E1000E_INT_MODE_LEGACY;
- e_info("MSI interrupt test failed, using legacy interrupt.\n");
+ e_info("MSI interrupt test failed, using legacy interrupt\n");
} else {
e_dbg("MSI interrupt test succeeded!\n");
}
@@ -5479,7 +5479,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
pull_size = min_t(unsigned int, 4, skb->data_len);
if (!__pskb_pull_tail(skb, pull_size)) {
- e_err("__pskb_pull_tail failed.\n");
+ e_err("__pskb_pull_tail failed\n");
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
@@ -5658,7 +5658,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
/* Jumbo frame support */
if ((max_frame > ETH_FRAME_LEN + ETH_FCS_LEN) &&
!(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
- e_err("Jumbo Frames not supported.\n");
+ e_err("Jumbo Frames not supported\n");
return -EINVAL;
}
@@ -5673,7 +5673,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
if ((adapter->hw.mac.type >= e1000_pch2lan) &&
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
(new_mtu > ETH_DATA_LEN)) {
- e_err("Jumbo Frames not supported on this device when CRC stripping is disabled.\n");
+ e_err("Jumbo Frames not supported on this device when CRC stripping is disabled\n");
return -EINVAL;
}
diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c
index a9a976f..4c93785 100644
--- a/drivers/net/ethernet/intel/e1000e/nvm.c
+++ b/drivers/net/ethernet/intel/e1000e/nvm.c
@@ -598,7 +598,7 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
for (i = 0; i < NVM_CHECKSUM_REG; i++) {
ret_val = e1000_read_nvm(hw, i, 1, &nvm_data);
if (ret_val) {
- e_dbg("NVM Read Error while updating checksum.\n");
+ e_dbg("NVM Read Error while updating checksum\n");
return ret_val;
}
checksum += nvm_data;
@@ -606,7 +606,7 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
checksum = (u16)NVM_SUM - checksum;
ret_val = e1000_write_nvm(hw, NVM_CHECKSUM_REG, 1, &checksum);
if (ret_val)
- e_dbg("NVM Write Error while updating checksum.\n");
+ e_dbg("NVM Write Error while updating checksum\n");
return ret_val;
}
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c
index 00b3fc9..2a08e71 100644
--- a/drivers/net/ethernet/intel/e1000e/phy.c
+++ b/drivers/net/ethernet/intel/e1000e/phy.c
@@ -847,7 +847,7 @@ s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw)
ret_val = e1000_phy_hw_reset(hw);
if (ret_val) {
- e_dbg("Error resetting the PHY.\n");
+ e_dbg("Error resetting the PHY\n");
return ret_val;
}
@@ -1232,7 +1232,7 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw)
udelay(1);
if (phy->autoneg_wait_to_complete) {
- e_dbg("Waiting for forced speed/duplex link on IGP phy.\n");
+ e_dbg("Waiting for forced speed/duplex link on IGP phy\n");
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
100000, &link);
@@ -1240,7 +1240,7 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw)
return ret_val;
if (!link)
- e_dbg("Link taking longer than expected.\n");
+ e_dbg("Link taking longer than expected\n");
/* Try once more */
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
@@ -1299,7 +1299,7 @@ s32 e1000e_phy_force_speed_duplex_m88(struct e1000_hw *hw)
}
if (phy->autoneg_wait_to_complete) {
- e_dbg("Waiting for forced speed/duplex link on M88 phy.\n");
+ e_dbg("Waiting for forced speed/duplex link on M88 phy\n");
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
100000, &link);
@@ -1308,7 +1308,7 @@ s32 e1000e_phy_force_speed_duplex_m88(struct e1000_hw *hw)
if (!link) {
if (hw->phy.type != e1000_phy_m88) {
- e_dbg("Link taking longer than expected.\n");
+ e_dbg("Link taking longer than expected\n");
} else {
/* We didn't get link.
* Reset the DSP and cross our fingers.
@@ -1401,7 +1401,7 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw)
udelay(1);
if (phy->autoneg_wait_to_complete) {
- e_dbg("Waiting for forced speed/duplex link on IFE phy.\n");
+ e_dbg("Waiting for forced speed/duplex link on IFE phy\n");
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
100000, &link);
@@ -1409,7 +1409,7 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw)
return ret_val;
if (!link)
- e_dbg("Link taking longer than expected.\n");
+ e_dbg("Link taking longer than expected\n");
/* Try once more */
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
@@ -2660,8 +2660,7 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
/* Gig must be disabled for MDIO accesses to Host Wakeup reg page */
if ((hw->mac.type == e1000_pchlan) &&
(!(er32(PHY_CTRL) & E1000_PHY_CTRL_GBE_DISABLE)))
- e_dbg("Attempting to access page %d while gig enabled.\n",
- page);
+ e_dbg("Attempting to access page %d while gig enabled\n", page);
if (!page_set) {
/* Enable access to PHY wakeup registers */
@@ -2793,8 +2792,8 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
}
}
- e_dbg("reading PHY page %d (or 0x%x shifted) reg 0x%x\n", page,
- page << IGP_PAGE_SHIFT, reg);
+ e_dbg("reading PHY page %d (or 0x%x shifted) reg 0x%x\n",
+ page, page << IGP_PAGE_SHIFT, reg);
ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg, data);
out:
@@ -2915,8 +2914,8 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
}
}
- e_dbg("writing PHY page %d (or 0x%x shifted) reg 0x%x\n", page,
- page << IGP_PAGE_SHIFT, reg);
+ e_dbg("writing PHY page %d (or 0x%x shifted) reg 0x%x\n",
+ page, page << IGP_PAGE_SHIFT, reg);
ret_val = e1000e_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
data);
@@ -3136,7 +3135,7 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw)
return ret_val;
if (!link)
- e_dbg("Link taking longer than expected.\n");
+ e_dbg("Link taking longer than expected\n");
/* Try once more */
ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index f2d35c0..7ea5ef7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1356,8 +1356,7 @@ static bool reg_pattern_test(struct ixgbe_adapter *adapter, u64 *data, int reg,
ixgbe_write_reg(&adapter->hw, reg, test_pattern[pat] & write);
val = ixgbe_read_reg(&adapter->hw, reg);
if (val != (test_pattern[pat] & write & mask)) {
- e_err(drv, "pattern test reg %04X failed: got "
- "0x%08X expected 0x%08X\n",
+ e_err(drv, "pattern test reg %04X failed: got 0x%08X expected 0x%08X\n",
reg, val, (test_pattern[pat] & write & mask));
*data = reg;
ixgbe_write_reg(&adapter->hw, reg, before);
@@ -1381,8 +1380,8 @@ static bool reg_set_and_check(struct ixgbe_adapter *adapter, u64 *data, int reg,
ixgbe_write_reg(&adapter->hw, reg, write & mask);
val = ixgbe_read_reg(&adapter->hw, reg);
if ((write & mask) != (val & mask)) {
- e_err(drv, "set/check reg %04X test failed: got 0x%08X "
- "expected 0x%08X\n", reg, (val & mask), (write & mask));
+ e_err(drv, "set/check reg %04X test failed: got 0x%08X expected 0x%08X\n",
+ reg, (val & mask), (write & mask));
*data = reg;
ixgbe_write_reg(&adapter->hw, reg, before);
return true;
@@ -1429,8 +1428,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
ixgbe_write_reg(&adapter->hw, IXGBE_STATUS, toggle);
after = ixgbe_read_reg(&adapter->hw, IXGBE_STATUS) & toggle;
if (value != after) {
- e_err(drv, "failed STATUS register test got: 0x%08X "
- "expected: 0x%08X\n", after, value);
+ e_err(drv, "failed STATUS register test got: 0x%08X expected: 0x%08X\n",
+ after, value);
*data = 1;
return 1;
}
@@ -1539,8 +1538,8 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data)
*data = 1;
return -1;
}
- e_info(hw, "testing %s interrupt\n", shared_int ?
- "shared" : "unshared");
+ e_info(hw, "testing %s interrupt\n",
+ shared_int ? "shared" : "unshared");
/* Disable all the interrupts */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF);
@@ -2036,8 +2035,7 @@ static void ixgbe_diag_test(struct net_device *netdev,
* loopback diagnostic. */
if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED |
IXGBE_FLAG_VMDQ_ENABLED)) {
- e_info(hw, "Skip MAC loopback diagnostic in VT "
- "mode\n");
+ e_info(hw, "Skip MAC loopback diagnostic in VT mode\n");
data[3] = 0;
goto skip_loopback;
}
@@ -2221,8 +2219,7 @@ static bool ixgbe_update_rsc(struct ixgbe_adapter *adapter)
adapter->rx_itr_setting > IXGBE_MIN_RSC_ITR) {
if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)) {
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
- e_info(probe, "rx-usecs value high enough "
- "to re-enable RSC\n");
+ e_info(probe, "rx-usecs value high enough to re-enable RSC\n");
return true;
}
/* if interrupt rate is too high then disable RSC */
@@ -2786,8 +2783,7 @@ static int ixgbe_set_rss_hash_opt(struct ixgbe_adapter *adapter,
if ((flags2 & UDP_RSS_FLAGS) &&
!(adapter->flags2 & UDP_RSS_FLAGS))
- e_warn(drv, "enabling UDP RSS: fragmented packets"
- " may arrive out of order to the stack above\n");
+ e_warn(drv, "enabling UDP RSS: fragmented packets may arrive out of order to the stack above\n");
adapter->flags2 = flags2;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index 0872617..ecf2131 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -796,7 +796,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
return -EINVAL;
- e_info(drv, "Enabling FCoE offload features.\n");
+ e_info(drv, "Enabling FCoE offload features\n");
if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
e_warn(probe, "Enabling FCoE on PF will disable legacy VFs\n");
@@ -840,7 +840,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
return -EINVAL;
- e_info(drv, "Disabling FCoE offload features.\n");
+ e_info(drv, "Disabling FCoE offload features\n");
if (netif_running(netdev))
netdev->netdev_ops->ndo_stop(netdev);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 10b35d8..7c0cbef 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2450,9 +2450,7 @@ static void ixgbe_check_overtemp_subtask(struct ixgbe_adapter *adapter)
break;
}
e_crit(drv,
- "Network adapter has been stopped because it has over heated. "
- "Restart the computer. If the problem persists, "
- "power off the system and replace the adapter\n");
+ "Network adapter has been stopped because it has over heated. Restart the computer. If the problem persists, power off the system and replace the adapter.\n");
adapter->interrupt_event = 0;
}
@@ -2497,9 +2495,7 @@ static void ixgbe_check_overtemp_event(struct ixgbe_adapter *adapter, u32 eicr)
}
e_crit(drv,
- "Network adapter has been stopped because it has over heated. "
- "Restart the computer. If the problem persists, "
- "power off the system and replace the adapter\n");
+ "Network adapter has been stopped because it has over heated. Restart the computer. If the problem persists, power off the system and replace the adapter.\n");
}
static void ixgbe_check_sfp_event(struct ixgbe_adapter *adapter, u32 eicr)
@@ -2818,8 +2814,8 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
err = request_irq(entry->vector, &ixgbe_msix_clean_rings, 0,
q_vector->name, q_vector);
if (err) {
- e_err(probe, "request_irq failed for MSIX interrupt "
- "Error: %d\n", err);
+ e_err(probe, "request_irq failed for MSIX interrupt - Error: %d\n",
+ err);
goto free_queue_irqs;
}
/* If Flow Director is enabled, set interrupt affinity */
@@ -3405,8 +3401,8 @@ static void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter,
} while (--wait_loop && !(rxdctl & IXGBE_RXDCTL_ENABLE));
if (!wait_loop) {
- e_err(drv, "RXDCTL.ENABLE on Rx queue %d not set within "
- "the polling period\n", reg_idx);
+ e_err(drv, "RXDCTL.ENABLE on Rx queue %d not set within the polling period\n",
+ reg_idx);
}
}
@@ -3437,8 +3433,8 @@ void ixgbe_disable_rx_queue(struct ixgbe_adapter *adapter,
} while (--wait_loop && (rxdctl & IXGBE_RXDCTL_ENABLE));
if (!wait_loop) {
- e_err(drv, "RXDCTL.ENABLE on Rx queue %d not cleared within "
- "the polling period\n", reg_idx);
+ e_err(drv, "RXDCTL.ENABLE on Rx queue %d not cleared within the polling period\n",
+ reg_idx);
}
}
@@ -4114,9 +4110,8 @@ static int ixgbe_hpbthresh(struct ixgbe_adapter *adapter, int pb)
* to user and a do the best we can.
*/
if (marker < 0) {
- e_warn(drv, "Packet Buffer(%i) can not provide enough"
- "headroom to support flow control."
- "Decrease MTU or number of traffic classes\n", pb);
+ e_warn(drv, "Packet Buffer(%i) can not provide enough headroom to support flow control - decrease MTU or number of traffic classes\n",
+ pb);
marker = tc + 1;
}
@@ -5947,8 +5942,7 @@ static void ixgbe_fdir_reinit_subtask(struct ixgbe_adapter *adapter)
/* re-enable flow director interrupts */
IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR);
} else {
- e_err(probe, "failed to finish FDIR re-initialization, "
- "ignored adding FDIR ATR filters\n");
+ e_err(probe, "failed to finish FDIR re-initialization, ignored adding FDIR ATR filters\n");
}
}
@@ -6107,16 +6101,13 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
ixgbe_ptp_start_cyclecounter(adapter);
e_info(drv, "NIC Link is Up %s, Flow Control: %s\n",
- (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
- "10 Gbps" :
- (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
- "1 Gbps" :
- (link_speed == IXGBE_LINK_SPEED_100_FULL ?
- "100 Mbps" :
- "unknown speed"))),
- ((flow_rx && flow_tx) ? "RX/TX" :
- (flow_rx ? "RX" :
- (flow_tx ? "TX" : "None"))));
+ link_speed == IXGBE_LINK_SPEED_10GB_FULL ? "10 Gbps" :
+ link_speed == IXGBE_LINK_SPEED_1GB_FULL ? "1 Gbps" :
+ link_speed == IXGBE_LINK_SPEED_100_FULL ? "100 Mbps" :
+ "unknown speed",
+ flow_rx && flow_tx ? "RX/TX" :
+ flow_rx ? "RX" :
+ flow_tx ? "TX" : "None");
netif_carrier_on(netdev);
ixgbe_check_vf_rate_limit(adapter);
@@ -7508,8 +7499,7 @@ static int ixgbe_set_features(struct net_device *netdev,
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
need_reset = true;
} else if ((changed ^ features) & NETIF_F_LRO) {
- e_info(probe, "rx-usecs set too low, "
- "disabling RSC\n");
+ e_info(probe, "rx-usecs set too low, disabling RSC\n");
}
}
@@ -7640,7 +7630,7 @@ static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, reg);
e_info(drv, "enabling bridge mode: %s\n",
- mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
+ mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
}
return 0;
@@ -8503,7 +8493,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
int err;
if (pci_enable_device_mem(pdev)) {
- e_err(probe, "Cannot re-enable PCI device after reset.\n");
+ e_err(probe, "Cannot re-enable PCI device after reset\n");
result = PCI_ERS_RESULT_DISCONNECT;
} else {
adapter->hw.hw_addr = adapter->io_addr;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index d2caae4..9ee8e64 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -1174,7 +1174,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
status = 0;
} else {
if (hw->allow_unsupported_sfp) {
- e_warn(drv, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.");
+ e_warn(drv, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.\n");
status = 0;
} else {
hw_dbg(hw,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 9ef730f..c23d3ad 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -460,7 +460,7 @@ void ixgbe_ptp_rx_hang(struct ixgbe_adapter *adapter)
IXGBE_READ_REG(hw, IXGBE_RXSTMPH);
adapter->last_rx_ptp_check = jiffies;
- e_warn(drv, "clearing RX Timestamp hang");
+ e_warn(drv, "clearing RX Timestamp hang\n");
}
}
@@ -518,7 +518,7 @@ static void ixgbe_ptp_tx_hwtstamp_work(struct work_struct *work)
if (timeout) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
adapter->ptp_tx_skb = NULL;
- e_warn(drv, "clearing Tx Timestamp hang");
+ e_warn(drv, "clearing Tx Timestamp hang\n");
return;
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index dff0977..a90814e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -164,8 +164,7 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter)
/* If we have gotten to this point then there is no memory available
* to manage the VF devices - print message and bail.
*/
- e_err(probe, "Unable to allocate memory for VF Data Storage - "
- "SRIOV disabled\n");
+ e_err(probe, "Unable to allocate memory for VF Data Storage - SRIOV disabled\n");
ixgbe_disable_sriov(adapter);
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 18:44 ` Joe Perches
2014-03-14 19:14 ` Joe Perches
@ 2014-03-14 19:16 ` Jakub Kiciński
1 sibling, 0 replies; 25+ messages in thread
From: Jakub Kiciński @ 2014-03-14 19:16 UTC (permalink / raw)
To: Joe Perches; +Cc: Jeff Kirsher, netdev, e1000-devel
On Fri, 14 Mar 2014 11:44:15 -0700, Joe Perches wrote:
> On Fri, 2014-03-14 at 19:02 +0100, Jakub Kiciński wrote:
> > On Fri, 14 Mar 2014 10:48:37 -0700, Joe Perches wrote:
> > > On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> > > > Hardware may fail to report time stamp e.g.:
> > > > - when hardware time stamping is not enabled
> > > > - when time stamp is requested shortly after ifup
> > >
> > > trivia:
> > >
> > > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> > > []
> > > > @@ -1155,6 +1155,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
> > > > skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
> > > > dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > > adapter->tx_hwtstamp_skb = NULL;
> > > > + } else if (time_after(jiffies, adapter->tx_hwtstamp_start
> > > > + + adapter->tx_timeout_factor * HZ)) {
> > > > + dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
> > > > + adapter->tx_hwtstamp_skb = NULL;
> > > > + adapter->tx_hwtstamp_timeouts++;
> > > > + e_warn("clearing Tx timestamp hang");
> > >
> > > Missing \n termination
> >
> > I copied that line from ixgbe and assumed that the magic macro adds
> > termination...
> >
> > I see that igb and i40e also lack the \n on similar messages.
>
> There's a bunch of them.
>
> > Can I fix
> > them all in a single follow-up patch?
>
> There are also a bunch of _dbg messages that lack that
> \n and those seem to be function tracing uses that should
> just be deleted.
Good point! I'll take care of them too, thanks!
-- kuba
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work
2014-03-14 17:34 ` [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work Jakub Kicinski
@ 2014-03-14 23:17 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:17 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> tx_hwtstamp_skb is always set before work is scheduled,
> work is cancelled before tx_hwtstamp_skb is set to NULL.
> PTP work cannot ever see tx_hwtstamp_skb set to NULL.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 3 ---
> 1 file changed, 3 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 04/10] ixgbe: remove redundant if clause from PTP work
2014-03-14 17:34 ` [PATCH net-next 04/10] ixgbe: " Jakub Kicinski
@ 2014-03-14 23:17 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:17 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> ptp_tx_skb is always set before work is scheduled,
> work is cancelled before ptp_tx_skb is set to NULL.
> PTP work cannot ever see ptp_tx_skb set to NULL.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 4 ----
> 1 file changed, 4 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps
2014-03-14 17:34 ` [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 23:17 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:17 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> skb_tx_timestamp() does not report software time stamp
> if SKBTX_IN_PROGRESS is set. According to timestamping.txt
> software time stamps are a fallback and should not be
> generated if hardware time stamp is provided.
>
> Move call to skb_tx_timestamp() after setting
> SKBTX_IN_PROGRESS.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp
2014-03-14 17:34 ` [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
@ 2014-03-14 23:18 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:18 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> ixgbe has a single set of TX time stamping resources per NIC.
> Use a simple bit lock to avoid race conditions and leaking skbs
> when multiple TX rings try to claim time stamping.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 +
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +++-
> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 3 +++
> 3 files changed, 7 insertions(+), 1 deletion(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 07/10] igb: never generate both software and hardware timestamps
2014-03-14 17:34 ` [PATCH net-next 07/10] igb: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 23:18 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:18 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: e1000-devel, netdev
[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> skb_tx_timestamp() does not report software time stamp
> if SKBTX_IN_PROGRESS is set. According to timestamping.txt
> software time stamps are a fallback and should not be
> generated if hardware time stamp is provided.
>
> Move call to skb_tx_timestamp() after setting
> SKBTX_IN_PROGRESS.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 370 bytes --]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp
2014-03-14 17:34 ` [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
@ 2014-03-14 23:18 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:18 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: e1000-devel, netdev
[-- Attachment #1.1: Type: text/plain, Size: 570 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> igb has a single set of TX time stamping resources per NIC.
> Use a simple bit lock to avoid race conditions and leaking skbs
> when multiple TX rings try to claim time stamping.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/igb/igb.h | 3 ++-
> drivers/net/ethernet/intel/igb/igb_main.c | 3 ++-
> drivers/net/ethernet/intel/igb/igb_ptp.c | 3 +++
> 3 files changed, 7 insertions(+), 2 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 370 bytes --]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps
2014-03-14 17:34 ` [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps Jakub Kicinski
@ 2014-03-14 23:18 ` Jeff Kirsher
0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:18 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> skb_tx_timestamp() does not report software time stamp
> if SKBTX_IN_PROGRESS is set. According to timestamping.txt
> software time stamps are a fallback and should not be
> generated if hardware time stamp is provided.
>
> Move call to skb_tx_timestamp() after setting
> SKBTX_IN_PROGRESS.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work
2014-03-14 17:34 ` [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work Jakub Kicinski
2014-03-14 17:48 ` Joe Perches
@ 2014-03-14 23:20 ` Jeff Kirsher
1 sibling, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:20 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, e1000-devel
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On Fri, 2014-03-14 at 18:34 +0100, Jakub Kicinski wrote:
> Hardware may fail to report time stamp e.g.:
> - when hardware time stamping is not enabled
> - when time stamp is requested shortly after ifup
>
> Timeout time stamp reading work to prevent it from
> scheduling itself indefinitely. Report timeout events
> via system log and device stats.
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> ---
> drivers/net/ethernet/intel/e1000e/e1000.h | 2 ++
> drivers/net/ethernet/intel/e1000e/ethtool.c | 1 +
> drivers/net/ethernet/intel/e1000e/netdev.c | 7 +++++++
> 3 files changed, 10 insertions(+)
Thanks Jakub, I will add this patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2014-03-14 23:20 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 17:34 [PATCH net-next 00/10] Small fixes for Tx time stamping in Intel drivers Jakub Kicinski
2014-03-14 17:34 ` [PATCH net-next 01/10] doc: update driver TX algorithm in timestamping.txt Jakub Kicinski
2014-03-14 19:12 ` Sergei Shtylyov
2014-03-14 17:34 ` [PATCH net-next 02/10] e1000e: add timeout for TX HW time stamping work Jakub Kicinski
2014-03-14 17:48 ` Joe Perches
2014-03-14 18:02 ` Jakub Kiciński
2014-03-14 18:44 ` Joe Perches
2014-03-14 19:14 ` Joe Perches
2014-03-14 19:16 ` Jakub Kiciński
2014-03-14 23:20 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 03/10] e1000e: remove redundant if clause from PTP work Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 04/10] ixgbe: " Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 05/10] ixgbe: never generate both software and hardware timestamps Jakub Kicinski
2014-03-14 23:17 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 06/10] ixgbe: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 07/10] igb: never generate both software and hardware timestamps Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 08/10] igb: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 09/10] i40e: never generate both software and hardware timestamps Jakub Kicinski
2014-03-14 23:18 ` Jeff Kirsher
2014-03-14 17:34 ` [PATCH net-next 10/10] i40e: fix race conditions on queuing skb for HW time stamp Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).