]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix check for autoneg enablement in the PHY FW
authorSomnath Kotur <somnath.kotur@broadcom.com>
Wed, 15 Jun 2022 14:57:03 +0000 (20:27 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 24 Jun 2022 21:26:18 +0000 (23:26 +0200)
commit0f0f2fd444803aa9828125402054e004351cdffd
tree1c5a926022b0ec51f0732fdce111c2c0e6b05b3e
parent89670e3b0f852615c29c510d5f6c04d147675c7e
net/bnxt: fix check for autoneg enablement in the PHY FW

The current combination of checks to determine whether autoneg is
enabled in the card is a bit convoluted and may become incorrect
as well in the future as one of the fields being used - auto_link_speed
might become deprecated.
Switch to using the 'auto_mode' field obtained from the response of
HWRM_PHY_QCFG cmd as that is always deterministically set by the PHY
FW.
Fixed a bug in the 40G check to only look for the bit setting and
not the actual value.
Also, check the forced speeds first before trying to enforce the
auto speeds

Allow the user to set autoneg speed in all cases except for PAM4 200G
as PAM4 200G will come up only in forced mode.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c