diff options
author | Doug Ledford <dledford@redhat.com> | 2017-02-19 09:18:21 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-19 09:18:21 -0500 |
commit | 6dd7abae7110da6fa01f048baf5b679b5a4a56dd (patch) | |
tree | 17ca298bbae17f05bdadae7f88e3be0f113a713f /drivers/infiniband/hw/nes | |
parent | 6df6b4a9ce43deb57d3e23b0e79a529464b5cf37 (diff) | |
parent | 646ebd4166ca00bdf682a36bd2e1c9a74d848ac6 (diff) |
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.c | 12 |
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; |