IB/mlx5: Restore IB guid/policy for virtual functions
authorBodong Wang <bodong@mellanox.com>
Tue, 30 May 2017 07:18:24 +0000 (10:18 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 24 Jul 2017 14:34:28 +0000 (10:34 -0400)
commit7ecf6d8ff154e6f7471ee537a400d43a5f3b1c57
treeaa5eaf6f425d9ac53ad6a7c63d0e441cebf135f8
parent4a2da0b8c0782816f3ae6846ae7942fcbb0f8172
IB/mlx5: Restore IB guid/policy for virtual functions

When a user sets port_guid, node_guid or policy of an IB virtual
function, save this information in "struct mlx5_vf_context".

This information will be restored later when pci_resume is called.
To make sure this works, one can use aer-inject to generate PCI
errors on mlx5 devices and verify if relevant fields are restored
after PCI resume.

Signed-off-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/ib_virt.c
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/driver.h