Skip to content

Commit

Permalink
net/bnxt: fix 50G and 100G forced speed
Browse files Browse the repository at this point in the history
[ upstream commit dd8d40bc8294ee1f5753205d14f37accc7a7debc ]

Thor based NICs can support PAM4 as well as NRZ link negotiation.
While PAM4 can negotiate speeds at 50G, 100G and 200G, the PMD will
use NRZ signaling for 50G and 100G speeds. PAM4 signaling will be
used only for 200G speed negotiations.

Driver has to check for NRZ speed support first while forcing speed.

Fixes: c23f9de ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
Kalesh AP authored and kevintraynor committed Mar 5, 2024
1 parent f6e8248 commit e3391de
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions drivers/net/bnxt/bnxt_hwrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2972,6 +2972,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
struct bnxt_link_info *link_info)
{
uint16_t support_pam4_speeds = link_info->support_pam4_speeds;
uint16_t support_speeds = link_info->support_speeds;
uint16_t eth_link_speed = 0;

if (conf_link_speed == RTE_ETH_LINK_SPEED_AUTONEG)
Expand Down Expand Up @@ -3009,23 +3011,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB;
break;
case RTE_ETH_LINK_SPEED_50G:
if (link_info->support_pam4_speeds &
HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
} else {
if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB;
link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
} else if (support_pam4_speeds &
HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
}
break;
case RTE_ETH_LINK_SPEED_100G:
if (link_info->support_pam4_speeds &
HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
} else {
if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB;
link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
} else if (support_pam4_speeds &
HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
}
break;
case RTE_ETH_LINK_SPEED_200G:
Expand Down

0 comments on commit e3391de

Please sign in to comment.