Skip to content

Commit

Permalink
net/bnxt: fix check for autoneg enablement
Browse files Browse the repository at this point in the history
[ upstream commit 7b82c4d ]

HWRM_PORT_PHY_QCFG_OUTPUT response indicates the autoneg speed mask
supported by the FW. While enabling autoneg, driver should also check
the FW advertised PAM4 speeds supported in auto mode which is set
in the HWRM_PORT_PHY_QCFG_OUTPUT response.

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

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
Kalesh AP authored and bluca committed Feb 14, 2022
1 parent f05952e commit e7f6c76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/bnxt/bnxt_hwrm.c
Expand Up @@ -3145,7 +3145,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
bp->link_info->link_signal_mode);
link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
/* Autoneg can be done only when the FW allows. */
if (autoneg == 1 && bp->link_info->support_auto_speeds) {
if (autoneg == 1 &&
(bp->link_info->support_auto_speeds || bp->link_info->support_pam4_auto_speeds)) {
link_req.phy_flags |=
HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG;
link_req.auto_link_speed_mask =
Expand Down

0 comments on commit e7f6c76

Please sign in to comment.