bnxt: Fix BASE-T, 40G AOC, 1G-CX, autoneg and unknown media lists

This was broken in c63d67e137f3, the early returns prevent building the
media lists as expected.

The BASE-T parts of the patch were suggested by "cyric@mm.st", while I
am adding the additional 40G AOC, 1CX, autoneg and unknown PHY fixes
based on code inspection.  There may be additional work left here for
Broadcom but this is certainly better than the returns.

PR:		287395

Reported by:	mickael.maillot@gmail.com, cyric@mm.st
Tested by:	Einar Bjarni Halldórsson <einar@isnic.is>

(cherry picked from commit 5e6e4f752833acc96f1efc893318d3f6b74b9689)
This commit is contained in:
Kevin Bowling 2025-06-14 16:46:05 -07:00 committed by Franco Fichtner
parent 32ab81fa25
commit 0e656cb466

View file

@ -4609,34 +4609,34 @@ bnxt_add_media_types(struct bnxt_softc *softc)
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_ACTIVE_CABLE:
media_type = BNXT_MEDIA_AC;
return;
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASECX:
media_type = BNXT_MEDIA_BASECX;
return;
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASET:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE:
media_type = BNXT_MEDIA_BASET;
return;
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX:
media_type = BNXT_MEDIA_BASEKX;
return;
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY:
media_type = BNXT_MEDIA_BASESGMII;
return;
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
/* Only Autoneg is supported for TYPE_UNKNOWN */
return;
break;
default:
/* Only Autoneg is supported for new phy type values */
device_printf(softc->dev, "phy type %d not supported by driver\n", phy_type);
return;
break;
}
switch (link_info->sig_mode) {