- return !!timeout;
-}
-
-static void
-ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev)
-{
- struct ixgbe_adapter *ad = dev->data->dev_private;
- void *retval;
-
- if (!ixgbe_dev_wait_setup_link_complete(dev)) {
- pthread_cancel(ad->link_thread_tid);
- pthread_join(ad->link_thread_tid, &retval);
- rte_atomic32_clear(&ad->link_thread_running);
- PMD_DRV_LOG(ERR, "Link thread not complete, cancel it!");
+ if (timeout_ms) {
+ if (!timeout)
+ return 0;
+ } else if (!timeout) {
+ /* It will not return until link complete */
+ timeout = WARNING_TIMEOUT;
+ PMD_DRV_LOG(ERR, "IXGBE link thread not complete too long time!");
+ }