[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200411230347.22371-66-sashal@kernel.org>
Date: Sat, 11 Apr 2020 19:02:23 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Kamal Heib <kamalheib1@...il.com>,
Gal Pressman <galpress@...zon.com>,
Bernard Metzler <bmt@...ich.ibm.com>,
Jason Gunthorpe <jgg@...lanox.com>,
Sasha Levin <sashal@...nel.org>, linux-rdma@...r.kernel.org
Subject: [PATCH AUTOSEL 5.6 066/149] RDMA/siw: Fix setting active_mtu attribute
From: Kamal Heib <kamalheib1@...il.com>
[ Upstream commit beb205dd67aaa4315dedf5c40b47c6e9dee5a469 ]
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/20200205081354.30438-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@...il.com>
Reviewed-by: Gal Pressman <galpress@...zon.com>
Reviewed-by: Bernard Metzler <bmt@...ich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@...lanox.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/infiniband/sw/siw/siw_verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 07e30138aaa10..73485d0da907d 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;
--
2.20.1
Powered by blists - more mailing lists