* Copyright(c) 2017 Huawei Technologies Co., Ltd
*/
-#include<rte_ethdev_driver.h>
+#include<ethdev_driver.h>
#include <rte_bus_pci.h>
#include <rte_hash.h>
#include <rte_jhash.h>
rte_delay_ms(10);
} while (time_before(jiffies, end));
- return -EFAULT;
+ return -ETIMEDOUT;
}
#define HINIC_WAIT_CMDQ_IDLE_TIMEOUT 1000
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;
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));
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,