summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2017-02-19 15:18:21 +0100
committerDoug Ledford <dledford@redhat.com>2017-02-19 15:18:21 +0100
commit6dd7abae7110da6fa01f048baf5b679b5a4a56dd (patch)
tree17ca298bbae17f05bdadae7f88e3be0f113a713f /drivers/infiniband/hw/nes
parentIB/cma: Destination and source addr families must match (diff)
parentRDMA: Don't reference kernel private header from UAPI header (diff)
downloadlinux-6dd7abae7110da6fa01f048baf5b679b5a4a56dd.tar.xz
linux-6dd7abae7110da6fa01f048baf5b679b5a4a56dd.zip
Merge branch 'k.o/for-4.10-rc' into HEAD
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index aff9fb14768b..5a31f3c6a421 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -478,17 +478,7 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr
memset(props, 0, sizeof(*props));
props->max_mtu = IB_MTU_4096;
-
- if (netdev->mtu >= 4096)
- props->active_mtu = IB_MTU_4096;
- else if (netdev->mtu >= 2048)
- props->active_mtu = IB_MTU_2048;
- else if (netdev->mtu >= 1024)
- props->active_mtu = IB_MTU_1024;
- else if (netdev->mtu >= 512)
- props->active_mtu = IB_MTU_512;
- else
- props->active_mtu = IB_MTU_256;
+ props->active_mtu = ib_mtu_int_to_enum(netdev->mtu);
props->lid = 1;
props->lmc = 0;