net/dpaa: fix getting link status
authorRohit Raj <rohit.raj@nxp.com>
Wed, 24 Feb 2021 12:42:52 +0000 (18:12 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 24 Feb 2021 17:03:30 +0000 (18:03 +0100)
commit89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008
tree00219db5a545566c9ee474428945e52ebc2eb31e
parenteadcfd95ffde80b679b757d060f889f683c96266
net/dpaa: fix getting link status

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies
on rte_eth_link_get API for link statusand does not support link status
interrupt.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: 2aa10990a8dd ("bus/dpaa: enable link state interrupt")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa/dpaa_ethdev.c