aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_link.c
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2011-01-17 23:33:42 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-18 19:10:38 -0500
commit791f18c0da3ad540806122e173d6b730d7d7f60b (patch)
tree7d842cb483c3e7c8b1f7e6785de8f798390f4c1a /drivers/net/bnx2x/bnx2x_link.c
parent5c99274b0177cd614455c277b1a4d4410d9cb702 (diff)
bnx2x: Mark full duplex on some external PHYs
Device may show incorrect duplex mode for devices with external PHY Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_link.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_link.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
index 500258d38cf1..f5fd33ea0976 100644
--- a/drivers/net/bnx2x/bnx2x_link.c
+++ b/drivers/net/bnx2x/bnx2x_link.c
@@ -4408,6 +4408,7 @@ static u8 bnx2x_8073_read_status(struct bnx2x_phy *phy,
4408 } 4408 }
4409 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); 4409 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars);
4410 bnx2x_8073_resolve_fc(phy, params, vars); 4410 bnx2x_8073_resolve_fc(phy, params, vars);
4411 vars->duplex = DUPLEX_FULL;
4411 } 4412 }
4412 return link_up; 4413 return link_up;
4413} 4414}
@@ -5154,6 +5155,7 @@ static u8 bnx2x_8706_8726_read_status(struct bnx2x_phy *phy,
5154 else 5155 else
5155 vars->line_speed = SPEED_10000; 5156 vars->line_speed = SPEED_10000;
5156 bnx2x_ext_phy_resolve_fc(phy, params, vars); 5157 bnx2x_ext_phy_resolve_fc(phy, params, vars);
5158 vars->duplex = DUPLEX_FULL;
5157 } 5159 }
5158 return link_up; 5160 return link_up;
5159} 5161}
@@ -5850,8 +5852,11 @@ static u8 bnx2x_8727_read_status(struct bnx2x_phy *phy,
5850 DP(NETIF_MSG_LINK, "port %x: External link is down\n", 5852 DP(NETIF_MSG_LINK, "port %x: External link is down\n",
5851 params->port); 5853 params->port);
5852 } 5854 }
5853 if (link_up) 5855 if (link_up) {
5854 bnx2x_ext_phy_resolve_fc(phy, params, vars); 5856 bnx2x_ext_phy_resolve_fc(phy, params, vars);
5857 vars->duplex = DUPLEX_FULL;
5858 DP(NETIF_MSG_LINK, "duplex = 0x%x\n", vars->duplex);
5859 }
5855 5860
5856 if ((DUAL_MEDIA(params)) && 5861 if ((DUAL_MEDIA(params)) &&
5857 (phy->req_line_speed == SPEED_1000)) { 5862 (phy->req_line_speed == SPEED_1000)) {
@@ -6218,6 +6223,7 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
6218 /* Check link 10G */ 6223 /* Check link 10G */
6219 if (val2 & (1<<11)) { 6224 if (val2 & (1<<11)) {
6220 vars->line_speed = SPEED_10000; 6225 vars->line_speed = SPEED_10000;
6226 vars->duplex = DUPLEX_FULL;
6221 link_up = 1; 6227 link_up = 1;
6222 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); 6228 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars);
6223 } else { /* Check Legacy speed link */ 6229 } else { /* Check Legacy speed link */
@@ -6581,6 +6587,7 @@ static u8 bnx2x_7101_read_status(struct bnx2x_phy *phy,
6581 MDIO_AN_DEVAD, MDIO_AN_REG_MASTER_STATUS, 6587 MDIO_AN_DEVAD, MDIO_AN_REG_MASTER_STATUS,
6582 &val2); 6588 &val2);
6583 vars->line_speed = SPEED_10000; 6589 vars->line_speed = SPEED_10000;
6590 vars->duplex = DUPLEX_FULL;
6584 DP(NETIF_MSG_LINK, "SFX7101 AN status 0x%x->Master=%x\n", 6591 DP(NETIF_MSG_LINK, "SFX7101 AN status 0x%x->Master=%x\n",
6585 val2, (val2 & (1<<14))); 6592 val2, (val2 & (1<<14)));
6586 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); 6593 bnx2x_ext_phy_10G_an_resolve(bp, phy, vars);