mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
hv_netvsc: Remove GPADL teardown special case for old Hyper-V hosts
With the overall removal of Linux support for running on Hyper-V hosts earlier than WS2016 and Windows 10, the special case handling of GPADL teardown is no longer necessary. Remove it. Signed-off-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
@@ -728,17 +728,8 @@ void netvsc_device_remove(struct hv_device *device)
|
||||
= rtnl_dereference(net_device_ctx->nvdev);
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Revoke receive buffer. If host is pre-Win2016 then tear down
|
||||
* receive buffer GPADL. Do the same for send buffer.
|
||||
*/
|
||||
netvsc_revoke_recv_buf(device, net_device, ndev);
|
||||
if (vmbus_proto_version < VERSION_WIN10)
|
||||
netvsc_teardown_recv_gpadl(device, net_device, ndev);
|
||||
|
||||
netvsc_revoke_send_buf(device, net_device, ndev);
|
||||
if (vmbus_proto_version < VERSION_WIN10)
|
||||
netvsc_teardown_send_gpadl(device, net_device, ndev);
|
||||
|
||||
RCU_INIT_POINTER(net_device_ctx->nvdev, NULL);
|
||||
|
||||
@@ -766,14 +757,9 @@ void netvsc_device_remove(struct hv_device *device)
|
||||
/* Now, we can close the channel safely */
|
||||
vmbus_close(device->channel);
|
||||
|
||||
/*
|
||||
* If host is Win2016 or higher then we do the GPADL tear down
|
||||
* here after VMBus is closed.
|
||||
*/
|
||||
if (vmbus_proto_version >= VERSION_WIN10) {
|
||||
netvsc_teardown_recv_gpadl(device, net_device, ndev);
|
||||
netvsc_teardown_send_gpadl(device, net_device, ndev);
|
||||
}
|
||||
/* Must do the GPADL teardown after channel is closed */
|
||||
netvsc_teardown_recv_gpadl(device, net_device, ndev);
|
||||
netvsc_teardown_send_gpadl(device, net_device, ndev);
|
||||
|
||||
/* Release all resources */
|
||||
free_netvsc_device_rcu(net_device);
|
||||
|
||||
Reference in New Issue
Block a user