]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Fix invalid TX frames returned on error queue when time stamping
authorManfred Rudigier <Manfred.Rudigier@omicron.at>
Mon, 9 Jan 2012 23:26:51 +0000 (23:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2012 23:26:01 +0000 (15:26 -0800)
commitcd536b1da2195850bbcd332cf67bb7ff92d05dd3
tree1cc0c8626a929ecf04f8f84f9b289a20e95f32b5
parent2db3224409aa8dd0bcd3522c2a494ae3a33190eb
gianfar: Fix invalid TX frames returned on error queue when time stamping

When TX time stamping for PTP messages is enabled on a socket, a time
stamp is returned on the socket error queue to the user space application
after the frame was transmitted. The transmitted frame is also returned on
the error queue so that an application knows to which frame the time stamp
belongs.

In the current implementation the TxFCB is immediately followed by the
frame. Since the eTSEC inserts the TX time stamp 8 bytes after the TxFCB,
parts of the frame have been overwritten and an invalid frame was returned
on the socket error queue.

This patch fixes the described problem by adding additional 16 padding
bytes between the TxFCB and the frame for all messages sent from a time
stamping enabled socket (other sockets are not affected).

Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar.h