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

This was broken in c63d67e137, 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>
MFC after:	1 week
This commit is contained in:
Kevin Bowling
2025-06-14 16:46:05 -07:00
parent efcef5cec8
commit 5e6e4f7528
+7 -7
View File
@@ -4608,34 +4608,34 @@ bnxt_add_media_types(struct bnxt_softc *softc)
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_ACTIVE_CABLE: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_ACTIVE_CABLE:
media_type = BNXT_MEDIA_AC; media_type = BNXT_MEDIA_AC;
return; break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASECX: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASECX:
media_type = BNXT_MEDIA_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_1G_BASET:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE:
media_type = BNXT_MEDIA_BASET; media_type = BNXT_MEDIA_BASET;
return; break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX:
media_type = BNXT_MEDIA_BASEKX; media_type = BNXT_MEDIA_BASEKX;
return; break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY:
media_type = BNXT_MEDIA_BASESGMII; media_type = BNXT_MEDIA_BASESGMII;
return; break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
/* Only Autoneg is supported for TYPE_UNKNOWN */ /* Only Autoneg is supported for TYPE_UNKNOWN */
return; break;
default: default:
/* Only Autoneg is supported for new phy type values */ /* Only Autoneg is supported for new phy type values */
device_printf(softc->dev, "phy type %d not supported by driver\n", phy_type); device_printf(softc->dev, "phy type %d not supported by driver\n", phy_type);
return; break;
} }
switch (link_info->sig_mode) { switch (link_info->sig_mode) {