Commit b9cbb809 authored by Jian Shen's avatar Jian Shen Committed by chenyi
Browse files

net: hns3: direct return when receive a unknown mailbox message

mainline inclusion
from mainline-v6.9-rc4
commit 669554c512d2107e2f21616f38e050d40655101f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9QYBA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=669554c512d2107e2f21616f38e050d40655101f



----------------------------------------------------

Currently, the driver didn't return when receive a unknown
mailbox message, and continue checking whether need to
generate a response. It's unnecessary and may be incorrect.

Fixes: bb5790b7 ("net: hns3: refactor mailbox response scheme between PF and VF")
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarchenyi <chenyi211@huawei.com>
parent 2b6cfc33
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1171,12 +1171,13 @@ static void hclge_mbx_request_handling(struct hclge_mbx_ops_param *param)

	hdev = param->vport->back;
	cmd_func = hclge_mbx_ops_list[param->req->msg.code];
	if (cmd_func)
		ret = cmd_func(param);
	else
	if (!cmd_func) {
		dev_err(&hdev->pdev->dev,
			"un-supported mailbox message, code = %u\n",
			param->req->msg.code);
		return;
	}
	ret = cmd_func(param);

	/* PF driver should not reply IMP */
	if (hnae3_get_bit(param->req->mbx_need_resp, HCLGE_MBX_NEED_RESP_B) &&