ibmvnic: Unmap DMA address of TX descriptor buffers after use
authorThomas Falcon <tlfalcon@linux.ibm.com>
Wed, 14 Aug 2019 19:57:05 +0000 (14:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:33:48 +0000 (10:33 +0100)
commitea78dc8b5e667d31c539192f54e214554c2a1b31
tree2230d14e75641bab6207f1fbe88ffe3f8ed47161
parent4fcb9b3f263efde74d97190e43c690b4ed732bbf
ibmvnic: Unmap DMA address of TX descriptor buffers after use

[ Upstream commit 80f0fe0934cd3daa13a5e4d48a103f469115b160 ]

There's no need to wait until a completion is received to unmap
TX descriptor buffers that have been passed to the hypervisor.
Instead unmap it when the hypervisor call has completed. This patch
avoids the possibility that a buffer will not be unmapped because
a TX completion is lost or mishandled.

Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Tested-by: Devesh K. Singh <devesh_singh@in.ibm.com>
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c