Skip to content

Commit a8168b6

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Don't print "Link speed -1 no longer supported" messages.
On some dual port NICs, the 2 ports have to be configured with compatible link speeds. Under some conditions, a port's configured speed may no longer be supported. The firmware will send a message to the driver when this happens. Improve this logic that prints out the warning by only printing it if we can determine the link speed that is no longer supported. If the speed is unknown or it is in autoneg mode, skip the warning message. Reported-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Tested-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 24e5992 commit a8168b6

File tree

1 file changed

+7
-3
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,12 +1706,16 @@ static int bnxt_async_event_process(struct bnxt *bp,
17061706

17071707
if (BNXT_VF(bp))
17081708
goto async_event_process_exit;
1709-
if (data1 & 0x20000) {
1709+
1710+
/* print unsupported speed warning in forced speed mode only */
1711+
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED) &&
1712+
(data1 & 0x20000)) {
17101713
u16 fw_speed = link_info->force_link_speed;
17111714
u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
17121715

1713-
netdev_warn(bp->dev, "Link speed %d no longer supported\n",
1714-
speed);
1716+
if (speed != SPEED_UNKNOWN)
1717+
netdev_warn(bp->dev, "Link speed %d no longer supported\n",
1718+
speed);
17151719
}
17161720
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
17171721
/* fall thru */

0 commit comments

Comments
 (0)