bnxt_en: Print FEC settings as part of the linkup dmesg.
Print FEC (Forward Error Correction) autoneg and encoding settings during link up. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
33dac24abb
commit
e70c752f88
|
@ -5437,7 +5437,7 @@ static void bnxt_report_link(struct bnxt *bp)
|
|||
if (bp->link_info.link_up) {
|
||||
const char *duplex;
|
||||
const char *flow_ctrl;
|
||||
u16 speed;
|
||||
u16 speed, fec;
|
||||
|
||||
netif_carrier_on(bp->dev);
|
||||
if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL)
|
||||
|
@ -5459,6 +5459,12 @@ static void bnxt_report_link(struct bnxt *bp)
|
|||
netdev_info(bp->dev, "EEE is %s\n",
|
||||
bp->eee.eee_active ? "active" :
|
||||
"not active");
|
||||
fec = bp->link_info.fec_cfg;
|
||||
if (!(fec & PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED))
|
||||
netdev_info(bp->dev, "FEC autoneg %s encodings: %s\n",
|
||||
(fec & BNXT_FEC_AUTONEG) ? "on" : "off",
|
||||
(fec & BNXT_FEC_ENC_BASE_R) ? "BaseR" :
|
||||
(fec & BNXT_FEC_ENC_RS) ? "RS" : "None");
|
||||
} else {
|
||||
netif_carrier_off(bp->dev);
|
||||
netdev_err(bp->dev, "NIC Link is Down\n");
|
||||
|
@ -5583,6 +5589,11 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
link_info->fec_cfg = PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED;
|
||||
if (bp->hwrm_spec_code >= 0x10504)
|
||||
link_info->fec_cfg = le16_to_cpu(resp->fec_cfg);
|
||||
|
||||
/* TODO: need to add more logic to report VF link */
|
||||
if (chng_link_state) {
|
||||
if (link_info->phy_link_status == BNXT_LINK_LINK)
|
||||
|
|
|
@ -867,6 +867,10 @@ struct bnxt_link_info {
|
|||
u16 force_link_speed;
|
||||
u32 preemphasis;
|
||||
u8 module_status;
|
||||
u16 fec_cfg;
|
||||
#define BNXT_FEC_AUTONEG PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_ENABLED
|
||||
#define BNXT_FEC_ENC_BASE_R PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_ENABLED
|
||||
#define BNXT_FEC_ENC_RS PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_ENABLED
|
||||
|
||||
/* copy of requested setting from ethtool cmd */
|
||||
u8 autoneg;
|
||||
|
|
Loading…
Reference in New Issue