net/cxgbe: support flow API for destination MAC rewrite
[dpdk.git] / drivers / net / hns3 / hns3_cmd.c
index 3eebfdd..5ec3dfe 100644 (file)
@@ -215,28 +215,13 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
        head = hns3_read_dev(hw, HNS3_CMDQ_TX_HEAD_REG);
 
        if (!is_valid_csq_clean_head(csq, head)) {
-               struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
-               uint32_t global;
-               uint32_t fun_rst;
                hns3_err(hw, "wrong cmd head (%u, %u-%u)", head,
                            csq->next_to_use, csq->next_to_clean);
-               rte_atomic16_set(&hw->reset.disable_cmd, 1);
-               if (hns->is_vf) {
-                       global = hns3_read_dev(hw, HNS3_VF_RST_ING);
-                       fun_rst = hns3_read_dev(hw, HNS3_FUN_RST_ING);
-                       hns3_err(hw, "Delayed VF reset global: %x fun_rst: %x",
-                                global, fun_rst);
-                       hns3_atomic_set_bit(HNS3_VF_RESET, &hw->reset.pending);
-               } else {
-                       global = hns3_read_dev(hw, HNS3_GLOBAL_RESET_REG);
-                       fun_rst = hns3_read_dev(hw, HNS3_FUN_RST_ING);
-                       hns3_err(hw, "Delayed IMP reset global: %x fun_rst: %x",
-                                global, fun_rst);
-                       hns3_atomic_set_bit(HNS3_IMP_RESET, &hw->reset.pending);
+               if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+                       rte_atomic16_set(&hw->reset.disable_cmd, 1);
+                       hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw));
                }
 
-               hns3_schedule_delayed_reset(hns);
-
                return -EIO;
        }
 
@@ -359,7 +344,7 @@ static int hns3_cmd_poll_reply(struct hns3_hw *hw)
                timeout++;
        } while (timeout < hw->cmq.tx_timeout);
        hns3_err(hw, "Wait for reply timeout");
-       return -EBADE;
+       return -ETIME;
 }
 
 /*