Skip to content

Commit

Permalink
gianfar: fix the last transmit buffer descriptor
Browse files Browse the repository at this point in the history
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: 48963b4 ("gianfar: Remove redundant ops for do_tstamp
       from xmit()")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yangbo Lu authored and David S. Miller committed Jun 3, 2016
1 parent 8d5958f commit 9c8b077
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/freescale/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9c8b077

Please sign in to comment.