Skip to content

Commit f3d88fe

Browse files
Gautam R Akuba-moo
authored andcommitted
bnxt_en: Enhance log message in bnxt_get_module_status()
Rturn early with -EOPNOTSUPP and an extack message if the PHY type is BaseT since module status is not available for BaseT. Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Gautam R A <gautam-r.a@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20251126215648.1885936-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent caa343e commit f3d88fe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4623,6 +4623,11 @@ static int bnxt_get_module_status(struct bnxt *bp, struct netlink_ext_ack *extac
46234623
PORT_PHY_QCFG_RESP_MODULE_STATUS_WARNINGMSG)
46244624
return 0;
46254625

4626+
if (bp->link_info.phy_type == PORT_PHY_QCFG_RESP_PHY_TYPE_BASET ||
4627+
bp->link_info.phy_type == PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE){
4628+
NL_SET_ERR_MSG_MOD(extack, "Operation not supported as PHY type is Base-T");
4629+
return -EOPNOTSUPP;
4630+
}
46264631
switch (bp->link_info.module_status) {
46274632
case PORT_PHY_QCFG_RESP_MODULE_STATUS_PWRDOWN:
46284633
NL_SET_ERR_MSG_MOD(extack, "Transceiver module is powering down");

0 commit comments

Comments
 (0)