RDMA/siw: Fix reporting vendor_part_id
authorKamal Heib <kamalheib1@gmail.com>
Tue, 7 Jul 2020 13:09:31 +0000 (16:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:23 +0000 (08:13 +0200)
commit51d1a5ba09fb0fd40256946fbe79225d07d40722
tree1ab9de8e957f6796ef2bd04cfd9261b0dcd5e651
parented2f2a9a1fa1a1109a4fbf3e59f72c3cb6a17237
RDMA/siw: Fix reporting vendor_part_id

[ Upstream commit 04340645f69ab7abb6f9052688a60f0213b3f79c ]

Move the initialization of the vendor_part_id to be before calling
ib_register_device(), this is needed because the query_device() callback
is called from the context of ib_register_device() before initializing the
vendor_part_id, so the reported value is wrong.

Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface")
Link: https://lore.kernel.org/r/20200707130931.444724-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/siw/siw_main.c