net/hns3: fix traffic management
[dpdk.git] / drivers / net / hns3 / hns3_intr.c
index 905c6d9..0b307fd 100644 (file)
@@ -1783,8 +1783,11 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
 
        /* configure TM QCN hw errors */
        hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_TM_QCN_MEM_INT_CFG, false);
-       if (en)
+       desc.data[0] = rte_cpu_to_le_32(HNS3_TM_QCN_ERR_INT_TYPE);
+       if (en) {
+               desc.data[0] |= rte_cpu_to_le_32(HNS3_TM_QCN_FIFO_INT_EN);
                desc.data[1] = rte_cpu_to_le_32(HNS3_TM_QCN_MEM_ERR_INT_EN);
+       }
 
        ret = hns3_cmd_send(hw, &desc, 1);
        if (ret)
@@ -2579,7 +2582,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
 static bool
 hns3_reset_err_handle(struct hns3_adapter *hns)
 {
-#define MAX_RESET_FAIL_CNT 5
+#define MAX_RESET_FAIL_CNT 30
 
        struct hns3_hw *hw = &hns->hw;
 
@@ -2673,7 +2676,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
 static int
 hns3_reset_post(struct hns3_adapter *hns)
 {
-#define TIMEOUT_RETRIES_CNT    5
+#define TIMEOUT_RETRIES_CNT    30
        struct hns3_hw *hw = &hns->hw;
        struct timeval tv_delta;
        struct timeval tv;