Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2afc5d61 authored by Mohammed Gamal's avatar Mohammed Gamal Committed by David S. Miller
Browse files

hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown



When changing network interface settings, Windows guests
older than WS2016 can no longer shutdown. This was addressed
by commit 0ef58b0a ("hv_netvsc: change GPAD teardown order
on older versions"), however the issue also occurs on WS2012
guests that share NVSP protocol versions with WS2016 guests.
Hence we use Windows version directly to differentiate them.

Fixes: 0ef58b0a ("hv_netvsc: change GPAD teardown order on older versions")
Signed-off-by: default avatarMohammed Gamal <mgamal@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3d92f0b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -590,13 +590,13 @@ void netvsc_device_remove(struct hv_device *device)
	netdev_dbg(ndev, "net device safe to remove\n");
	netdev_dbg(ndev, "net device safe to remove\n");


	/* older versions require that buffer be revoked before close */
	/* older versions require that buffer be revoked before close */
	if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4)
	if (vmbus_proto_version < VERSION_WIN10)
		netvsc_teardown_gpadl(device, net_device);
		netvsc_teardown_gpadl(device, net_device);


	/* Now, we can close the channel safely */
	/* Now, we can close the channel safely */
	vmbus_close(device->channel);
	vmbus_close(device->channel);


	if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4)
	if (vmbus_proto_version >= VERSION_WIN10)
		netvsc_teardown_gpadl(device, net_device);
		netvsc_teardown_gpadl(device, net_device);


	/* Release all resources */
	/* Release all resources */