All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gianfar: fix the last transmit buffer descriptor
@ 2016-06-02  9:36 Yangbo Lu
  2016-06-02 11:02 ` Claudiu Manoil
  2016-06-03 23:32 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Yangbo Lu @ 2016-06-02  9:36 UTC (permalink / raw)
  To: netdev; +Cc: Claudiu Manoil, Yangbo Lu

When the transmit hardware timestamping is enabled, an additional
TxBD would be added and would be set as the last TxBD with TXBD_LAST
and TXBD_INTERRUPT. However this has been broken by a patch recently.
This made the software couldn't get transmit hardware timestamps and
resulted in call trace. So, this patch is to fix this issue.

Fixes: 48963b4492e9 ("gianfar: Remove redundant ops for do_tstamp
       from xmit()")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 7615e06..2e6785b 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2440,7 +2440,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 						 tx_queue->tx_ring_size);
 
 	if (likely(!nr_frags)) {
-		lstatus |= BD_LFLAG(TXBD_LAST | TXBD_INTERRUPT);
+		if (likely(!do_tstamp))
+			lstatus |= BD_LFLAG(TXBD_LAST | TXBD_INTERRUPT);
 	} else {
 		u32 lstatus_start = lstatus;
 
-- 
2.1.0.27.g96db324

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

* RE: [PATCH] gianfar: fix the last transmit buffer descriptor
  2016-06-02  9:36 [PATCH] gianfar: fix the last transmit buffer descriptor Yangbo Lu
@ 2016-06-02 11:02 ` Claudiu Manoil
  2016-06-03 23:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Claudiu Manoil @ 2016-06-02 11:02 UTC (permalink / raw)
  To: Yangbo Lu, netdev

>-----Original Message-----
>From: Yangbo Lu [mailto:yangbo.lu@nxp.com]
>Sent: Thursday, June 02, 2016 12:36 PM
>To: netdev@vger.kernel.org
>Cc: Claudiu Manoil <claudiu.manoil@freescale.com>; Yangbo Lu
><yangbo.lu@nxp.com>
>Subject: [PATCH] gianfar: fix the last transmit buffer descriptor
>
>When the transmit hardware timestamping is enabled, an additional
>TxBD would be added and would be set as the last TxBD with TXBD_LAST
>and TXBD_INTERRUPT. However this has been broken by a patch recently.
>This made the software couldn't get transmit hardware timestamps and
>resulted in call trace. So, this patch is to fix this issue.
>
>Fixes: 48963b4492e9 ("gianfar: Remove redundant ops for do_tstamp
>       from xmit()")
Thanks.

Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>

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

* Re: [PATCH] gianfar: fix the last transmit buffer descriptor
  2016-06-02  9:36 [PATCH] gianfar: fix the last transmit buffer descriptor Yangbo Lu
  2016-06-02 11:02 ` Claudiu Manoil
@ 2016-06-03 23:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-03 23:32 UTC (permalink / raw)
  To: yangbo.lu; +Cc: netdev, claudiu.manoil

From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Thu, 2 Jun 2016 17:36:28 +0800

> When the transmit hardware timestamping is enabled, an additional
> TxBD would be added and would be set as the last TxBD with TXBD_LAST
> and TXBD_INTERRUPT. However this has been broken by a patch recently.
> This made the software couldn't get transmit hardware timestamps and
> resulted in call trace. So, this patch is to fix this issue.
> 
> Fixes: 48963b4492e9 ("gianfar: Remove redundant ops for do_tstamp
>        from xmit()")
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Applied, thanks.

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

end of thread, other threads:[~2016-06-03 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02  9:36 [PATCH] gianfar: fix the last transmit buffer descriptor Yangbo Lu
2016-06-02 11:02 ` Claudiu Manoil
2016-06-03 23:32 ` David Miller

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