* [PATCH] ravb: fix software timestamping
@ 2016-03-27 10:22 Lino Sanfilippo
2016-03-27 12:50 ` Sergei Shtylyov
2016-03-28 2:42 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Lino Sanfilippo @ 2016-03-27 10:22 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, Lino Sanfilippo
In ravb_start_xmit dont call skb_tx_timestamp only when hardware
timestamping is requested: in the latter case software timestamps are
suppressed and thus the call of skb_tx_timestamp does not have any effect.
Instead call skb_tx_timestamp unconditionally in ravb_start_xmit, since
the function checks itself if software timestamping is required or should
be skipped due to hardware timestamping.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx•de>
---
drivers/net/ethernet/renesas/ravb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Sergei, please note that this is only compile tested, since I dont have access
to the concerning hardware.
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 4e1a7db..087e14a 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1377,11 +1377,11 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
/* TAG and timestamp required flag */
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
- skb_tx_timestamp(skb);
desc->tagh_tsr = (ts_skb->tag >> 4) | TX_TSR;
desc->ds_tagl |= le16_to_cpu(ts_skb->tag << 12);
}
+ skb_tx_timestamp(skb);
/* Descriptor type must be set after all the above writes */
dma_wmb();
desc->die_dt = DT_FEND;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ravb: fix software timestamping
2016-03-27 10:22 [PATCH] ravb: fix software timestamping Lino Sanfilippo
@ 2016-03-27 12:50 ` Sergei Shtylyov
2016-03-28 2:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2016-03-27 12:50 UTC (permalink / raw)
To: Lino Sanfilippo; +Cc: netdev
Hello.
On 03/27/2016 01:22 PM, Lino Sanfilippo wrote:
> In ravb_start_xmit dont call skb_tx_timestamp only when hardware
> timestamping is requested: in the latter case software timestamps are
> suppressed and thus the call of skb_tx_timestamp does not have any effect.
>
> Instead call skb_tx_timestamp unconditionally in ravb_start_xmit, since
> the function checks itself if software timestamping is required or should
> be skipped due to hardware timestamping.
>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx•de>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ravb: fix software timestamping
2016-03-27 10:22 [PATCH] ravb: fix software timestamping Lino Sanfilippo
2016-03-27 12:50 ` Sergei Shtylyov
@ 2016-03-28 2:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-03-28 2:42 UTC (permalink / raw)
To: LinoSanfilippo; +Cc: sergei.shtylyov, netdev
From: Lino Sanfilippo <LinoSanfilippo@gmx•de>
Date: Sun, 27 Mar 2016 12:22:02 +0200
> In ravb_start_xmit dont call skb_tx_timestamp only when hardware
> timestamping is requested: in the latter case software timestamps are
> suppressed and thus the call of skb_tx_timestamp does not have any effect.
>
> Instead call skb_tx_timestamp unconditionally in ravb_start_xmit, since
> the function checks itself if software timestamping is required or should
> be skipped due to hardware timestamping.
>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx•de>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-28 2:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-27 10:22 [PATCH] ravb: fix software timestamping Lino Sanfilippo
2016-03-27 12:50 ` Sergei Shtylyov
2016-03-28 2:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox