]>
Commit | Line | Data |
---|---|---|
ce68affe GKH |
1 | From foo@baz Sun Mar 18 16:55:33 CET 2018 |
2 | From: Michael Chan <michael.chan@broadcom.com> | |
3 | Date: Wed, 6 Dec 2017 17:31:22 -0500 | |
4 | Subject: bnxt_en: Don't print "Link speed -1 no longer supported" messages. | |
5 | ||
6 | From: Michael Chan <michael.chan@broadcom.com> | |
7 | ||
8 | ||
9 | [ Upstream commit a8168b6cee6e9334dfebb4b9108e8d73794f6088 ] | |
10 | ||
11 | On some dual port NICs, the 2 ports have to be configured with compatible | |
12 | link speeds. Under some conditions, a port's configured speed may no | |
13 | longer be supported. The firmware will send a message to the driver | |
14 | when this happens. | |
15 | ||
16 | Improve this logic that prints out the warning by only printing it if | |
17 | we can determine the link speed that is no longer supported. If the | |
18 | speed is unknown or it is in autoneg mode, skip the warning message. | |
19 | ||
20 | Reported-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> | |
21 | Signed-off-by: Michael Chan <michael.chan@broadcom.com> | |
22 | Tested-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> | |
23 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
24 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
25 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
26 | --- | |
27 | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +++++++--- | |
28 | 1 file changed, 7 insertions(+), 3 deletions(-) | |
29 | ||
30 | --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |
31 | +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |
32 | @@ -1498,12 +1498,16 @@ static int bnxt_async_event_process(stru | |
33 | ||
34 | if (BNXT_VF(bp)) | |
35 | goto async_event_process_exit; | |
36 | - if (data1 & 0x20000) { | |
37 | + | |
38 | + /* print unsupported speed warning in forced speed mode only */ | |
39 | + if (!(link_info->autoneg & BNXT_AUTONEG_SPEED) && | |
40 | + (data1 & 0x20000)) { | |
41 | u16 fw_speed = link_info->force_link_speed; | |
42 | u32 speed = bnxt_fw_to_ethtool_speed(fw_speed); | |
43 | ||
44 | - netdev_warn(bp->dev, "Link speed %d no longer supported\n", | |
45 | - speed); | |
46 | + if (speed != SPEED_UNKNOWN) | |
47 | + netdev_warn(bp->dev, "Link speed %d no longer supported\n", | |
48 | + speed); | |
49 | } | |
50 | set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event); | |
51 | /* fall thru */ |