Commit 14400901 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: treat 0 speed as link down (copper)

Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarYaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d231023e
...@@ -10178,17 +10178,19 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy, ...@@ -10178,17 +10178,19 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
DP(NETIF_MSG_LINK, "Legacy speed status = 0x%x\n", DP(NETIF_MSG_LINK, "Legacy speed status = 0x%x\n",
legacy_status); legacy_status);
link_up = ((legacy_status & (1<<11)) == (1<<11)); link_up = ((legacy_status & (1<<11)) == (1<<11));
if (link_up) { legacy_speed = (legacy_status & (3<<9));
legacy_speed = (legacy_status & (3<<9)); if (legacy_speed == (0<<9))
if (legacy_speed == (0<<9)) vars->line_speed = SPEED_10;
vars->line_speed = SPEED_10; else if (legacy_speed == (1<<9))
else if (legacy_speed == (1<<9)) vars->line_speed = SPEED_100;
vars->line_speed = SPEED_100; else if (legacy_speed == (2<<9))
else if (legacy_speed == (2<<9)) vars->line_speed = SPEED_1000;
vars->line_speed = SPEED_1000; else { /* Should not happen: Treat as link down */
else /* Should not happen */ vars->line_speed = 0;
vars->line_speed = 0; link_up = 0;
}
if (link_up) {
if (legacy_status & (1<<8)) if (legacy_status & (1<<8))
vars->duplex = DUPLEX_FULL; vars->duplex = DUPLEX_FULL;
else else
......
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