* [PATCH V3 01/10] net: export time stamp utility function for Ethernet MAC drivers
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
@ 2011-06-12 12:18 ` Richard Cochran
2011-06-12 12:18 ` [PATCH V3 02/10] fec: enable transmit and receive time stamping Richard Cochran
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:18 UTC (permalink / raw)
To: netdev; +Cc: David Miller
The network stack provides the function, skb_clone_tx_timestamp().
Ethernet MAC drivers can call this via the transmit time stamping
hook, skb_tx_timestamp(). This commit exports the clone function so
that drivers using it can be compiled as modules.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
net/core/timestamping.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/core/timestamping.c b/net/core/timestamping.c
index 7e7ca37..3b00a6b 100644
--- a/net/core/timestamping.c
+++ b/net/core/timestamping.c
@@ -68,6 +68,7 @@ void skb_clone_tx_timestamp(struct sk_buff *skb)
break;
}
}
+EXPORT_SYMBOL_GPL(skb_clone_tx_timestamp);
void skb_complete_tx_timestamp(struct sk_buff *skb,
struct skb_shared_hwtstamps *hwtstamps)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 02/10] fec: enable transmit and receive time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
2011-06-12 12:18 ` [PATCH V3 01/10] net: export time stamp utility function for Ethernet MAC drivers Richard Cochran
@ 2011-06-12 12:18 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 03/10] davinci_emac: pass ioctls through to phy device Richard Cochran
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:18 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Greg Ungerer, Uwe Kleine-König, Shawn Guo
This patch has been tested on the Freescale M5234BCC, which includes the
National Semiconductor DP83640 with IEEE 1588 support.
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/fec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 885d8ba..965fe90 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -326,6 +326,8 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
spin_unlock_irqrestore(&fep->hw_lock, flags);
+ skb_tx_timestamp(skb);
+
return NETDEV_TX_OK;
}
@@ -650,7 +652,8 @@ fec_enet_rx(struct net_device *ndev)
skb_put(skb, pkt_len - 4); /* Make room */
skb_copy_to_linear_data(skb, data, pkt_len - 4);
skb->protocol = eth_type_trans(skb, ndev);
- netif_rx(skb);
+ if (!skb_defer_rx_timestamp(skb))
+ netif_rx(skb);
}
bdp->cbd_bufaddr = dma_map_single(&fep->pdev->dev, data,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 03/10] davinci_emac: pass ioctls through to phy device.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
2011-06-12 12:18 ` [PATCH V3 01/10] net: export time stamp utility function for Ethernet MAC drivers Richard Cochran
2011-06-12 12:18 ` [PATCH V3 02/10] fec: enable transmit and receive time stamping Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 04/10] davinci_emac: enable transmit time stamping Richard Cochran
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Anant Gole, Kevin Hilman
The DaVinci EMAC driver does not implement any ioctls, but still it can
pass them through to the phy device. This makes it possible for a phy
to offer PHC capabilities.
Cc: Anant Gole <anantgole@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/davinci_emac.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index dcc4a17..5c2baa4 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -1489,14 +1489,14 @@ static void emac_adjust_link(struct net_device *ndev)
*/
static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
{
- dev_warn(&ndev->dev, "DaVinci EMAC: ioctl not supported\n");
+ struct emac_priv *priv = netdev_priv(ndev);
if (!(netif_running(ndev)))
return -EINVAL;
/* TODO: Add phy read and write and private statistics get feature */
- return -EOPNOTSUPP;
+ return phy_mii_ioctl(priv->phydev, ifrq, cmd);
}
static int match_first_device(struct device *dev, void *data)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 04/10] davinci_emac: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (2 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 03/10] davinci_emac: pass ioctls through to phy device Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 05/10] tg3: " Richard Cochran
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Anant Gole, Kevin Hilman
This patch enables software (and phy device) transmit time stamping
for the DaVinci EMAC driver. Tested together with the dp83640 PHY.
Cc: Anant Gole <anantgole@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/davinci_emac.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 5c2baa4..f5688ff 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -1090,6 +1090,7 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev)
dev_err(emac_dev, "DaVinci EMAC: desc submit failed");
goto fail_tx;
}
+ skb_tx_timestamp(skb);
return NETDEV_TX_OK;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 05/10] tg3: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (3 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 04/10] davinci_emac: enable transmit time stamping Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 06/10] dnet: " Richard Cochran
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Matt Carlson, Michael Chan
This patch enables software (and phy device) transmit time stamping
for the TIGON3 driver. Compile tested only.
Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/tg3.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index a1f9f9e..743d997 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6091,6 +6091,8 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Packets are ready, update Tx producer idx local and on card. */
tw32_tx_mbox(tnapi->prodmbox, entry);
+ skb_tx_timestamp(skb);
+
tnapi->tx_prod = entry;
if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
netif_tx_stop_queue(txq);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 06/10] dnet: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (4 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 05/10] tg3: " Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 07/10] ethoc: " Richard Cochran
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Ilya Yanok
This patch enables software (and phy device) transmit time stamping
in the "Dave ethernet interface." Compile tested only.
Cc: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/dnet.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 8318ea0..c36763c 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -587,6 +587,8 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
dnet_writel(bp, irq_enable, INTR_ENB);
}
+ skb_tx_timestamp(skb);
+
/* free the buffer */
dev_kfree_skb(skb);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 07/10] ethoc: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (5 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 06/10] dnet: " Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 08/10] r6040: " Richard Cochran
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Thierry Reding
This patch enables software (and phy device) transmit time stamping
for the OpenCores 10/100 MAC driver. Compile tested only.
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/ethoc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index a83dd31..8645ec8 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -874,6 +874,7 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
spin_unlock_irq(&priv->lock);
+ skb_tx_timestamp(skb);
out:
dev_kfree_skb(skb);
return NETDEV_TX_OK;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 08/10] r6040: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (6 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 07/10] ethoc: " Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 09/10] stmmac: " Richard Cochran
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Florian Fainelli
This patch enables software (and phy device) transmit time stamping
for the RDC R6040 Fast Ethernet MAC. Compile tested only.
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/r6040.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 200a363..5ee5f8f 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -846,6 +846,8 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
spin_unlock_irqrestore(&lp->lock, flags);
+ skb_tx_timestamp(skb);
+
return NETDEV_TX_OK;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 09/10] stmmac: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (7 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 08/10] r6040: " Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-12 12:19 ` [PATCH V3 10/10] smsc9420: " Richard Cochran
2011-06-13 21:26 ` [PATCH V3 00/10] net: expand time stamping, batch #1 David Miller
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Giuseppe Cavallaro
This patch enables software (and phy device) transmit time stamping
for the STMicroelectronics Ethernet driver. Compile tested only.
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/stmmac/stmmac_main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index e25e44a..5b85f4c 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -1081,6 +1081,8 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
priv->hw->dma->enable_dma_transmission(priv->ioaddr);
+ skb_tx_timestamp(skb);
+
return NETDEV_TX_OK;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH V3 10/10] smsc9420: enable transmit time stamping.
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (8 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 09/10] stmmac: " Richard Cochran
@ 2011-06-12 12:19 ` Richard Cochran
2011-06-13 21:26 ` [PATCH V3 00/10] net: expand time stamping, batch #1 David Miller
10 siblings, 0 replies; 12+ messages in thread
From: Richard Cochran @ 2011-06-12 12:19 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Steve Glendinning
This patch enables software (and phy device) transmit time stamping
for the smsc9420. Compile tested only.
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/smsc9420.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index 4c92ad8..2d84f92 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1034,6 +1034,8 @@ static netdev_tx_t smsc9420_hard_start_xmit(struct sk_buff *skb,
smsc9420_reg_write(pd, TX_POLL_DEMAND, 1);
smsc9420_pci_flush_write(pd);
+ skb_tx_timestamp(skb);
+
return NETDEV_TX_OK;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH V3 00/10] net: expand time stamping, batch #1
2011-06-12 12:18 [PATCH V3 00/10] net: expand time stamping, batch #1 Richard Cochran
` (9 preceding siblings ...)
2011-06-12 12:19 ` [PATCH V3 10/10] smsc9420: " Richard Cochran
@ 2011-06-13 21:26 ` David Miller
10 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2011-06-13 21:26 UTC (permalink / raw)
To: richardcochran; +Cc: netdev
From: Richard Cochran <richardcochran@gmail.com>
Date: Sun, 12 Jun 2011 14:18:57 +0200
> Richard Cochran (10):
> net: export time stamp utility function for Ethernet MAC drivers
> fec: enable transmit and receive time stamping.
> davinci_emac: pass ioctls through to phy device.
> davinci_emac: enable transmit time stamping.
> tg3: enable transmit time stamping.
> dnet: enable transmit time stamping.
> ethoc: enable transmit time stamping.
> r6040: enable transmit time stamping.
> stmmac: enable transmit time stamping.
> smsc9420: enable transmit time stamping.
All applied to net-next-2.6, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread