net: hns3: add a conversion for mailbox's response code
authorJian Shen <shenjian15@huawei.com>
Wed, 18 Mar 2020 03:57:05 +0000 (11:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2020 03:22:25 +0000 (20:22 -0700)
commit027fd5316005fd524d963fe879d5bf24eee2ab85
tree28c0021fcc3493bd93fb69b494958dcfeac55a9a
parent09984483db080b541c8242d846c30bc1e6a194e1
net: hns3: add a conversion for mailbox's response code

Currently, when mailbox handling fails, the PF driver
just responds 1 to the VF driver. It is not sufficient
for the VF driver to find out why its mailbox fails.

So the error should be responded to VF, but the error
is type int and the response field in struct
hclge_mbx_pf_to_vf_cmd is type u16, a conversion is
needed.

Signed-off-by: Jian Shen <shenjian15@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
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c