net/ngbe: redesign internal PHY init flow
authorJiawen Wu <jiawenwu@trustnetic.com>
Mon, 30 May 2022 09:30:14 +0000 (17:30 +0800)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Tue, 31 May 2022 07:42:16 +0000 (09:42 +0200)
commit696a8211787503cac6b977600c1cba68a728a4ac
tree3d84ca399fd1bdd11b1ee211058095b46af7298c
parent0aeb133c585fd6809cf7acb6a5dc4c54392ac575
net/ngbe: redesign internal PHY init flow

Add to read efuse values from flash, and disable EEE to improve signal
quality. Remove PHY semaphore to access PHY registers faster. And remove
unnecessary page selection where quick access is required.

When rte_eth_link_get_nowait() is called frequently with LSC disabled by
self-developed applications, eventually the PHY status register will be
accessed frequently. It will cause internal PHY init failure, if they
are done simultaneously. So there is a protection added for internal PHY
init.

Fixes: 3518df5774c7 ("net/ngbe: support device start/stop")
Fixes: 91bc12c5227c ("net/ngbe: optimize PHY initialization process")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
drivers/net/ngbe/base/ngbe_hw.c
drivers/net/ngbe/base/ngbe_hw.h
drivers/net/ngbe/base/ngbe_phy.c
drivers/net/ngbe/base/ngbe_phy_rtl.c
drivers/net/ngbe/base/ngbe_type.h