diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2012-06-20 15:05:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-22 20:20:32 -0400 |
commit | 1440090111ad626c8ab3d3c10076254ab7d98777 (patch) | |
tree | e379f87ae5d6474098d8972f1bc5c9521eceacb7 /drivers | |
parent | d231023eb17134e43bf1dcea631dd156d9904b70 (diff) |
bnx2x: treat 0 speed as link down (copper)
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index b3c33ed2bc96..d38d269824fc 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -10178,17 +10178,19 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy, | |||
10178 | DP(NETIF_MSG_LINK, "Legacy speed status = 0x%x\n", | 10178 | DP(NETIF_MSG_LINK, "Legacy speed status = 0x%x\n", |
10179 | legacy_status); | 10179 | legacy_status); |
10180 | link_up = ((legacy_status & (1<<11)) == (1<<11)); | 10180 | link_up = ((legacy_status & (1<<11)) == (1<<11)); |
10181 | if (link_up) { | 10181 | legacy_speed = (legacy_status & (3<<9)); |
10182 | legacy_speed = (legacy_status & (3<<9)); | 10182 | if (legacy_speed == (0<<9)) |
10183 | if (legacy_speed == (0<<9)) | 10183 | vars->line_speed = SPEED_10; |
10184 | vars->line_speed = SPEED_10; | 10184 | else if (legacy_speed == (1<<9)) |
10185 | else if (legacy_speed == (1<<9)) | 10185 | vars->line_speed = SPEED_100; |
10186 | vars->line_speed = SPEED_100; | 10186 | else if (legacy_speed == (2<<9)) |
10187 | else if (legacy_speed == (2<<9)) | 10187 | vars->line_speed = SPEED_1000; |
10188 | vars->line_speed = SPEED_1000; | 10188 | else { /* Should not happen: Treat as link down */ |
10189 | else /* Should not happen */ | 10189 | vars->line_speed = 0; |
10190 | vars->line_speed = 0; | 10190 | link_up = 0; |
10191 | } | ||
10191 | 10192 | ||
10193 | if (link_up) { | ||
10192 | if (legacy_status & (1<<8)) | 10194 | if (legacy_status & (1<<8)) |
10193 | vars->duplex = DUPLEX_FULL; | 10195 | vars->duplex = DUPLEX_FULL; |
10194 | else | 10196 | else |