hv_netvsc: netvsc_teardown_gpadl() split
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 14 May 2018 22:32:05 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:26 +0000 (16:17 +0200)
commit284a58c02eeb7f235f0a465580cf1cd739cc7d5d
treee7ed48683cef4e7d36882413912d9fc7c8175103
parent6296e73e459d76ee9c6c83917bd4da6b5f8a049c
hv_netvsc: netvsc_teardown_gpadl() split

[ Commit 0cf737808ae7cb25e952be619db46b9147a92f46 upstream. ]

It was found that in some cases host refuses to teardown GPADL for send/
receive buffers (probably when some work with these buffere is scheduled or
ongoing). Change the teardown logic to be:
1) Send NVSP_MSG1_TYPE_REVOKE_* messages
2) Close the channel
3) Teardown GPADLs.
This seems to work reliably.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc.c