diff options
author | Muhammad Mahajna <muhammadm@mellanox.com> | 2015-04-02 16:31:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 16:25:04 -0400 |
commit | f0df35037a0a0df902a31f79065222951888bbc9 (patch) | |
tree | 001f076ede5c134373c69756039127519760e81c /drivers/net/ethernet/mellanox/mlx4/en_rx.c | |
parent | 51af33cfed248dc8f36fa82df06b85e10038a01e (diff) | |
download | op-kernel-dev-f0df35037a0a0df902a31f79065222951888bbc9.zip op-kernel-dev-f0df35037a0a0df902a31f79065222951888bbc9.tar.gz |
net/mlx4_en: Add RX-FCS support
Enabled when device supports KEEP FCS. When the flag is set, Ethernet FCS
is appended to the end of the frame, controlled by ethtool.
Signed-off-by: Muhammad Mahajna <muhammadm@mellanox.com>
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 698d60d..79b1501 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -1116,7 +1116,10 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, int qpn, /* Cancel FCS removal if FW allows */ if (mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_FCS_KEEP) { context->param3 |= cpu_to_be32(1 << 29); - ring->fcs_del = ETH_FCS_LEN; + if (priv->dev->features & NETIF_F_RXFCS) + ring->fcs_del = 0; + else + ring->fcs_del = ETH_FCS_LEN; } else ring->fcs_del = 0; |