diff options
author | Manfred Rudigier <Manfred.Rudigier@omicron.at> | 2012-01-09 23:26:51 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-12 23:26:01 (GMT) |
commit | 9c4886e5e63bbecea0b560829a96f37e8d9ddd7c (patch) | |
tree | 1cc0c8626a929ecf04f8f84f9b289a20e95f32b5 /drivers/net/ethernet/freescale/gianfar.h | |
parent | db83d136d7f7534857cd9c6e588adc08a428b190 (diff) | |
download | linux-fsl-qoriq-9c4886e5e63bbecea0b560829a96f37e8d9ddd7c.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.h')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h index fe7ac3a..40c33a7 100644 --- a/drivers/net/ethernet/freescale/gianfar.h +++ b/drivers/net/ethernet/freescale/gianfar.h @@ -63,6 +63,9 @@ struct ethtool_rx_list { /* Length for FCB */ #define GMAC_FCB_LEN 8 +/* Length for TxPAL */ +#define GMAC_TXPAL_LEN 16 + /* Default padding amount */ #define DEFAULT_PADDING 2 |