aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamal Heib <[email protected]>2020-02-05 10:13:54 +0200
committerJason Gunthorpe <[email protected]>2020-02-11 14:32:35 -0400
commitbeb205dd67aaa4315dedf5c40b47c6e9dee5a469 (patch)
treeaea0758695186f32ac2505ae6399819afd872842
parent9a4b24108d92ffaa886e37923088bd806b988948 (diff)
RDMA/siw: Fix setting active_mtu attribute
Make sure to set the active_mtu attribute to avoid report the following invalid value: $ ibv_devinfo -d siw0 | grep active_mtu active_mtu: invalid MTU (0) Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kamal Heib <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Reviewed-by: Bernard Metzler <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/sw/siw/siw_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 07e30138aaa1..73485d0da907 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -168,12 +168,12 @@ int siw_query_port(struct ib_device *base_dev, u8 port,
memset(attr, 0, sizeof(*attr));
- attr->active_mtu = attr->max_mtu;
attr->active_speed = 2;
attr->active_width = 2;
attr->gid_tbl_len = 1;
attr->max_msg_sz = -1;
attr->max_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
+ attr->active_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
attr->phys_state = sdev->state == IB_PORT_ACTIVE ?
IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
attr->pkey_tbl_len = 1;