hv_netvsc: Switch the data path at the right time during hibernation
authorDexuan Cui <decui@microsoft.com>
Wed, 9 Sep 2020 04:07:32 +0000 (21:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:28 +0000 (17:36 +0200)
commita634ff2bb06a4e3a57ec887f1a3e290c9044aba1
treed706866a8e308a26871b50a1f5349071607badc0
parent086ca81d03c329088ce115fb49cca84736c44988
hv_netvsc: Switch the data path at the right time during hibernation

[ Upstream commit de214e52de1bba5392b5b7054924a08dbd57c2f6 ]

When netvsc_resume() is called, the mlx5 VF NIC has not been resumed yet,
so in the future the host might sliently fail the call netvsc_vf_changed()
-> netvsc_switch_datapath() there, even if the call works now.

Call netvsc_vf_changed() in the NETDEV_CHANGE event handler: at that time
the mlx5 VF NIC has been resumed.

Fixes: 19162fd4063a ("hv_netvsc: Fix hibernation for mlx5 VF driver")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/hyperv/netvsc_drv.c