aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2015-06-11 14:47:27 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-11 15:55:25 -0700
commitfacc9699f0fe7d65a92cc09e175662659306066d (patch)
tree3a0bf16d0f4dcafcd2ab881e1cbf68d783e1f8a9 /drivers/infiniband/hw
parentnet/mlx5_core: fix an error code (diff)
downloadlinux-dev-facc9699f0fe7d65a92cc09e175662659306066d.tar.xz
linux-dev-facc9699f0fe7d65a92cc09e175662659306066d.zip
net/mlx5e: Fix HW MTU settings
Previously we configured HW MTU to be netdev->mtu, actually we need to configure netdev->mtu + (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN). Also, query MTU can not fail, hence make the relevant helper a void functionm, add mlx5e_set_dev_port_mtu, helper function to handle MTU setting. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index d4dea86052d6..79dadd627e9c 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -446,15 +446,11 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,
if (err)
goto out;
- err = mlx5_query_port_max_mtu(mdev, &max_mtu, port);
- if (err)
- goto out;
+ mlx5_query_port_max_mtu(mdev, &max_mtu, port);
props->max_mtu = mlx5_mtu_to_ib_mtu(max_mtu);
- err = mlx5_query_port_oper_mtu(mdev, &oper_mtu, port);
- if (err)
- goto out;
+ mlx5_query_port_oper_mtu(mdev, &oper_mtu, port);
props->active_mtu = mlx5_mtu_to_ib_mtu(oper_mtu);