net: hns3: fix a bug when alloc new buffer
authorLipeng <lipeng321@huawei.com>
Mon, 23 Oct 2017 11:51:01 +0000 (19:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:33 +0000 (10:10 +0100)
commit669ff2a9aa71edea93a0b74c1273080cad68dfb7
tree834ba57f9f7f5c3c9dec4edd412bf5abf602641e
parent122e18d27d77031b909a06f110f6da225502d033
net: hns3: fix a bug when alloc new buffer

[ Upstream commit b9077428ec5569aacb2952d8a2ffb51c8988d3c2 ]

When alloce new buffer to HW, should unmap the old buffer first.
This old code map the old buffer but not unmap the old buffer,
this patch fixes it.

Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC)

Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c