| 249 | } |
| 250 | |
| 251 | static void |
| 252 | sfc_dev_get_rte_link(struct rte_eth_dev *dev, int wait_to_complete, |
| 253 | struct rte_eth_link *link) |
| 254 | { |
| 255 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 256 | |
| 257 | SFC_ASSERT(link != NULL); |
| 258 | |
| 259 | if (sa->state != SFC_ETHDEV_STARTED) { |
| 260 | sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, link); |
| 261 | } else if (wait_to_complete) { |
| 262 | efx_link_mode_t link_mode; |
| 263 | |
| 264 | if (efx_port_poll(sa->nic, &link_mode) != 0) |
| 265 | link_mode = EFX_LINK_UNKNOWN; |
| 266 | sfc_port_link_mode_to_info(link_mode, link); |
| 267 | } else { |
| 268 | sfc_ev_mgmt_qpoll(sa); |
| 269 | rte_eth_linkstatus_get(dev, link); |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | static int |
| 274 | sfc_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) |
no test coverage detected