hinic: fix the bug of clearing event queue
authorLuo bin <luobin9@huawei.com>
Fri, 20 Mar 2020 23:13:17 +0000 (23:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:49:58 +0000 (10:49 +0200)
commit5edd115ba09eb2e1c38589c2d45807e162f1449c
tree76e1501dd899051f933cb223017b34c1f6f48fb8
parentd63fac896335ed64ca086c849ddeb14090784899
hinic: fix the bug of clearing event queue

[ Upstream commit 614eaa943e9fc3fcdbd4aa0692ae84973d363333 ]

should disable eq irq before freeing it, must clear event queue
depth in hw before freeing relevant memory to avoid illegal
memory access and update consumer idx to avoid invalid interrupt

Signed-off-by: Luo bin <luobin9@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c