X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhinic%2Fbase%2Fhinic_pmd_hwdev.c;h=cb9cf6efa287bf1e7faa7b535c56e2c0ab92388e;hb=1028e5bc36b4dd4ae51580eb3e45410b6c82e153;hp=c132de09e96ecb0c833836b99222d38f79680dc5;hpb=d807dd7d4cd8e3ef4d42bd945cfb8318e4fef5b6;p=dpdk.git diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c index c132de09e9..cb9cf6efa2 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Huawei Technologies Co., Ltd */ -#include +#include #include #include #include @@ -475,7 +475,7 @@ static int wait_for_flr_finish(struct hinic_hwif *hwif) rte_delay_ms(10); } while (time_before(jiffies, end)); - return -EFAULT; + return -ETIMEDOUT; } #define HINIC_WAIT_CMDQ_IDLE_TIMEOUT 1000 @@ -599,7 +599,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev) err = hinic_msg_to_mgmt_no_ack(hwdev, HINIC_MOD_COMM, HINIC_MGMT_CMD_START_FLR, &clr_res, - sizeof(clr_res), NULL, NULL); + sizeof(clr_res)); if (err) { PMD_DRV_LOG(WARNING, "Notice flush msg failed, err: %d", err); ret = err; @@ -681,17 +681,15 @@ int hinic_set_interrupt_cfg(struct hinic_hwdev *hwdev, u16 out_size = sizeof(msix_cfg); int err; - memset(&msix_cfg, 0, sizeof(msix_cfg)); - msix_cfg.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1; - msix_cfg.func_id = hinic_global_func_id(hwdev); - msix_cfg.msix_index = (u16)interrupt_info.msix_index; - temp_info.msix_index = interrupt_info.msix_index; - err = hinic_get_interrupt_cfg(hwdev, &temp_info); if (err) - return -EINVAL; + return -EIO; + memset(&msix_cfg, 0, sizeof(msix_cfg)); + msix_cfg.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1; + msix_cfg.func_id = hinic_global_func_id(hwdev); + msix_cfg.msix_index = (u16)interrupt_info.msix_index; msix_cfg.lli_credit_cnt = temp_info.lli_credit_limit; msix_cfg.lli_tmier_cnt = temp_info.lli_timer_cfg; msix_cfg.pending_cnt = temp_info.pending_limt; @@ -1051,7 +1049,7 @@ int hinic_get_board_info(void *hwdev, struct hinic_board_info *info) if (err || board_info.mgmt_msg_head.status || !out_size) { PMD_DRV_LOG(ERR, "Failed to get board info, err: %d, status: 0x%x, out size: 0x%x", err, board_info.mgmt_msg_head.status, out_size); - return -EFAULT; + return -EIO; } memcpy(info, &board_info.info, sizeof(*info)); @@ -1364,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret = hinic_link_event_process(hwdev, rte_dev, status); /* check if link has changed, notify callback */ if (ret == 0) - _rte_eth_dev_callback_process(rte_dev, - RTE_ETH_EVENT_INTR_LSC, - NULL); + rte_eth_dev_callback_process(rte_dev, + RTE_ETH_EVENT_INTR_LSC, + NULL); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,