net: hns3: Change fw error code NOT_EXEC to NOT_SUPPORTED

According to firmware error code definition, the error code of 2
means NOT_SUPPORTED, this patch changes it to NOT_SUPPORTED.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yunsheng Lin 2019-01-23 07:39:34 +08:00 committed by David S. Miller
parent ac574b80a1
commit 4a402f47cf
2 changed files with 3 additions and 1 deletions

View File

@ -259,6 +259,8 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num)
if (desc_ret == HCLGE_CMD_EXEC_SUCCESS) if (desc_ret == HCLGE_CMD_EXEC_SUCCESS)
retval = 0; retval = 0;
else if (desc_ret == HCLGE_CMD_NOT_SUPPORTED)
retval = -EOPNOTSUPP;
else else
retval = -EIO; retval = -EIO;
hw->cmq.last_status = desc_ret; hw->cmq.last_status = desc_ret;

View File

@ -39,7 +39,7 @@ struct hclge_cmq_ring {
enum hclge_cmd_return_status { enum hclge_cmd_return_status {
HCLGE_CMD_EXEC_SUCCESS = 0, HCLGE_CMD_EXEC_SUCCESS = 0,
HCLGE_CMD_NO_AUTH = 1, HCLGE_CMD_NO_AUTH = 1,
HCLGE_CMD_NOT_EXEC = 2, HCLGE_CMD_NOT_SUPPORTED = 2,
HCLGE_CMD_QUEUE_FULL = 3, HCLGE_CMD_QUEUE_FULL = 3,
}; };