net: hns3: Change fw error code NOT_EXEC to NOT_SUPPORTED
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 22 Jan 2019 23:39:34 +0000 (07:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2019 19:13:01 +0000 (11:13 -0800)
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h

index e483a6e730e6487bee7777d5ec8adffcb0117304..b0ee070884eb5cf4baedc9fba555d454a2231aaf 100644 (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)
                                retval = 0;
+                       else if (desc_ret == HCLGE_CMD_NOT_SUPPORTED)
+                               retval = -EOPNOTSUPP;
                        else
                                retval = -EIO;
                        hw->cmq.last_status = desc_ret;
index f23042b24c0940275585cf923ea25dd0f4151015..9f07279513b74d6d4240cac7aac92ea294bf844e 100644 (file)
@@ -39,7 +39,7 @@ struct hclge_cmq_ring {
 enum hclge_cmd_return_status {
        HCLGE_CMD_EXEC_SUCCESS  = 0,
        HCLGE_CMD_NO_AUTH       = 1,
-       HCLGE_CMD_NOT_EXEC      = 2,
+       HCLGE_CMD_NOT_SUPPORTED = 2,
        HCLGE_CMD_QUEUE_FULL    = 3,
 };