提交 14400901 编写于 作者: Y Yuval Mintz 提交者: David S. Miller

bnx2x: treat 0 speed as link down (copper)

Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: NYaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d231023e
......@@ -10178,7 +10178,6 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
DP(NETIF_MSG_LINK, "Legacy speed status = 0x%x\n",
legacy_status);
link_up = ((legacy_status & (1<<11)) == (1<<11));
if (link_up) {
legacy_speed = (legacy_status & (3<<9));
if (legacy_speed == (0<<9))
vars->line_speed = SPEED_10;
......@@ -10186,9 +10185,12 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
vars->line_speed = SPEED_100;
else if (legacy_speed == (2<<9))
vars->line_speed = SPEED_1000;
else /* Should not happen */
else { /* Should not happen: Treat as link down */
vars->line_speed = 0;
link_up = 0;
}
if (link_up) {
if (legacy_status & (1<<8))
vars->duplex = DUPLEX_FULL;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册