Browse Source

bnx2x: Fix register access timeout in 10M

In BCM8481 when link speed goes from 1G to 10M, driver received timeout
since the MAC clock hasn't synced yet with the new speed, so it is required
first to program the MAC with the new speed, and only then configure other
parameters

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>
Yaniv Rosner 15 years ago
parent
commit
0c786f0246
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/net/bnx2x_link.c

+ 2 - 1
drivers/net/bnx2x_link.c

@@ -6322,10 +6322,11 @@ static u8 bnx2x_update_link_up(struct link_params *params,
 		bnx2x_bmac_enable(params, vars, 0);
 		bnx2x_bmac_enable(params, vars, 0);
 		bnx2x_set_led(params, LED_MODE_OPER, SPEED_10000);
 		bnx2x_set_led(params, LED_MODE_OPER, SPEED_10000);
 	} else {
 	} else {
-		bnx2x_emac_enable(params, vars, 0);
 		rc = bnx2x_emac_program(params, vars->line_speed,
 		rc = bnx2x_emac_program(params, vars->line_speed,
 				      vars->duplex);
 				      vars->duplex);
 
 
+		bnx2x_emac_enable(params, vars, 0);
+
 		/* AN complete? */
 		/* AN complete? */
 		if (gp_status & MDIO_AN_CL73_OR_37_COMPLETE) {
 		if (gp_status & MDIO_AN_CL73_OR_37_COMPLETE) {
 			if (!(vars->phy_flags &
 			if (!(vars->phy_flags &