bnx2x: Legacy speeds autoneg failures
authorEilon Greenstein <eilong@broadcom.com>
Wed, 14 Jan 2009 06:44:21 +0000 (06:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jan 2009 00:20:12 +0000 (16:20 -0800)
10M/100M autoneg was not establishing link.

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>
drivers/net/bnx2x_link.c

index 4ce107c125d125bf4f0f2317b09c70a119e5dce2..2fd6be0cca13bbbf93e4342386f6c926bc9a3c9d 100644 (file)
@@ -3882,9 +3882,15 @@ static u8 bnx2x_link_initialize(struct link_params *params,
        }
 
        if (vars->phy_flags & PHY_XGXS_FLAG) {
-               if (params->req_line_speed &&
+               if ((params->req_line_speed &&
                    ((params->req_line_speed == SPEED_100) ||
-                    (params->req_line_speed == SPEED_10))) {
+                    (params->req_line_speed == SPEED_10))) ||
+                   (!params->req_line_speed &&
+                    (params->speed_cap_mask >=
+                      PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL) &&
+                    (params->speed_cap_mask <
+                      PORT_HW_CFG_SPEED_CAPABILITY_D0_1G)
+                    ))  {
                        vars->phy_flags |= PHY_SGMII_FLAG;
                } else {
                        vars->phy_flags &= ~PHY_SGMII_FLAG;