Commit 8eddb3e7 authored by Michael Chan's avatar Michael Chan Committed by Jakub Kicinski

bnxt_en: Log unknown link speed appropriately.

If the VF virtual link is set to always enabled, the speed may be
unknown when the physical link is down.  The driver currently logs
the link speed as 4294967295 Mbps which is SPEED_UNKNOWN.  Modify
the link up log message as "speed unknown" which makes more sense.
Reviewed-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/1602493854-29283-7-git-send-email-michael.chan@broadcom.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c966c67c
...@@ -8902,6 +8902,11 @@ static void bnxt_report_link(struct bnxt *bp) ...@@ -8902,6 +8902,11 @@ static void bnxt_report_link(struct bnxt *bp)
u16 fec; u16 fec;
netif_carrier_on(bp->dev); netif_carrier_on(bp->dev);
speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed);
if (speed == SPEED_UNKNOWN) {
netdev_info(bp->dev, "NIC Link is Up, speed unknown\n");
return;
}
if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL) if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL)
duplex = "full"; duplex = "full";
else else
...@@ -8914,7 +8919,6 @@ static void bnxt_report_link(struct bnxt *bp) ...@@ -8914,7 +8919,6 @@ static void bnxt_report_link(struct bnxt *bp)
flow_ctrl = "ON - receive"; flow_ctrl = "ON - receive";
else else
flow_ctrl = "none"; flow_ctrl = "none";
speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed);
netdev_info(bp->dev, "NIC Link is Up, %u Mbps %s duplex, Flow control: %s\n", netdev_info(bp->dev, "NIC Link is Up, %u Mbps %s duplex, Flow control: %s\n",
speed, duplex, flow_ctrl); speed, duplex, flow_ctrl);
if (bp->flags & BNXT_FLAG_EEE_CAP) if (bp->flags & BNXT_FLAG_EEE_CAP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment