net: hns3: fix incorrect resp_msg issue
authorJiaran Zhang <zhangjiaran@huawei.com>
Tue, 18 May 2021 11:36:00 +0000 (19:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 07:00:49 +0000 (09:00 +0200)
commit09867c500ec41e9b5a942d111554023a8c57cb72
tree80da2c54a809ab411221cd495002221df33408c7
parent815eb57e048b3cbb7c0b9c51105086c4c75fcb27
net: hns3: fix incorrect resp_msg issue

[ Upstream commit a710b9ffbebaf713f7dbd4dbd9524907e5d66f33 ]

In hclge_mbx_handler(), if there are two consecutive mailbox
messages that requires resp_msg, the resp_msg is not cleared
after processing the first message, which will cause the resp_msg
data of second message incorrect.

Fix it by clearing the resp_msg before processing every mailbox
message.

Fixes: bb5790b71bad ("net: hns3: refactor mailbox response scheme between PF and VF")
Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c