Skip to content

Commit 669554c

Browse files
IronShenPaolo Abeni
authored andcommitted
net: hns3: direct return when receive a unknown mailbox message
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: bb5790b ("net: hns3: refactor mailbox response scheme between PF and VF") Signed-off-by: Jian Shen <[email protected]> Signed-off-by: Jijie Shao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 05eb60e commit 669554c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,13 @@ static void hclge_mbx_request_handling(struct hclge_mbx_ops_param *param)
10771077

10781078
hdev = param->vport->back;
10791079
cmd_func = hclge_mbx_ops_list[param->req->msg.code];
1080-
if (cmd_func)
1081-
ret = cmd_func(param);
1082-
else
1080+
if (!cmd_func) {
10831081
dev_err(&hdev->pdev->dev,
10841082
"un-supported mailbox message, code = %u\n",
10851083
param->req->msg.code);
1084+
return;
1085+
}
1086+
ret = cmd_func(param);
10861087

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

0 commit comments

Comments
 (0)