net: hns3: fix incorrect resp_msg issue
authorJiaran Zhang <zhangjiaran@huawei.com>
Tue, 18 May 2021 11:36:00 +0000 (19:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2021 20:41:03 +0000 (13:41 -0700)
commita710b9ffbebaf713f7dbd4dbd9524907e5d66f33
tree5ec82dc9c45d92dab5648a04daf3279b6b7b8cb7
parent33e6b1674f339c5d3be56ec9b4921d1ddd14327d
net: hns3: fix incorrect resp_msg issue

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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c