aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_link.c
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2009-11-05 12:18:30 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-05 23:00:48 -0500
commit46d15cc7a09d6a7f96908b2cd812744c483893b4 (patch)
tree733a90a01ca680f445e2616671d5d8dfca7b4aa4 /drivers/net/bnx2x_link.c
parent93f72884dd1622e443109abcd3e5e8f8cca0a6fe (diff)
bnx2x: Fix 10G mode in BCM8481/BCM84823
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_link.c')
-rw-r--r--drivers/net/bnx2x_link.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index 1b73c1d72fc1..d2c9e19bcd5a 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -3533,8 +3533,8 @@ static void bnx2x_8481_set_10G_led_mode(struct link_params *params,
3533 MDIO_PMA_REG_8481_LINK_SIGNAL, 3533 MDIO_PMA_REG_8481_LINK_SIGNAL,
3534 &val1); 3534 &val1);
3535 /* Set bit 2 to 0, and bits [1:0] to 10 */ 3535 /* Set bit 2 to 0, and bits [1:0] to 10 */
3536 val1 &= ~((1<<0) | (1<<2)); /* Clear bits 0,2*/ 3536 val1 &= ~((1<<0) | (1<<2) | (1<<7)); /* Clear bits 0,2,7*/
3537 val1 |= (1<<1); /* Set bit 1 */ 3537 val1 |= ((1<<1) | (1<<6)); /* Set bit 1, 6 */
3538 3538
3539 bnx2x_cl45_write(bp, params->port, 3539 bnx2x_cl45_write(bp, params->port,
3540 ext_phy_type, 3540 ext_phy_type,
@@ -3568,36 +3568,19 @@ static void bnx2x_8481_set_10G_led_mode(struct link_params *params,
3568 MDIO_PMA_REG_8481_LED2_MASK, 3568 MDIO_PMA_REG_8481_LED2_MASK,
3569 0); 3569 0);
3570 3570
3571 /* LED3 (10G/1G/100/10G Activity) */ 3571 /* Unmask LED3 for 10G link */
3572 bnx2x_cl45_read(bp, params->port,
3573 ext_phy_type,
3574 ext_phy_addr,
3575 MDIO_PMA_DEVAD,
3576 MDIO_PMA_REG_8481_LINK_SIGNAL,
3577 &val1);
3578 /* Enable blink based on source 4(Activity) */
3579 val1 &= ~((1<<7) | (1<<8)); /* Clear bits 7,8 */
3580 val1 |= (1<<6); /* Set only bit 6 */
3581 bnx2x_cl45_write(bp, params->port, 3572 bnx2x_cl45_write(bp, params->port,
3582 ext_phy_type, 3573 ext_phy_type,
3583 ext_phy_addr, 3574 ext_phy_addr,
3584 MDIO_PMA_DEVAD, 3575 MDIO_PMA_DEVAD,
3585 MDIO_PMA_REG_8481_LINK_SIGNAL,
3586 val1);
3587
3588 bnx2x_cl45_read(bp, params->port,
3589 ext_phy_type,
3590 ext_phy_addr,
3591 MDIO_PMA_DEVAD,
3592 MDIO_PMA_REG_8481_LED3_MASK, 3576 MDIO_PMA_REG_8481_LED3_MASK,
3593 &val1); 3577 0x6);
3594 val1 |= (1<<4); /* Unmask LED3 for 10G link */
3595 bnx2x_cl45_write(bp, params->port, 3578 bnx2x_cl45_write(bp, params->port,
3596 ext_phy_type, 3579 ext_phy_type,
3597 ext_phy_addr, 3580 ext_phy_addr,
3598 MDIO_PMA_DEVAD, 3581 MDIO_PMA_DEVAD,
3599 MDIO_PMA_REG_8481_LED3_MASK, 3582 MDIO_PMA_REG_8481_LED3_BLINK,
3600 val1); 3583 0);
3601} 3584}
3602 3585
3603 3586
@@ -4476,17 +4459,12 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
4476 PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) { 4459 PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) {
4477 DP(NETIF_MSG_LINK, "Advertising 10G\n"); 4460 DP(NETIF_MSG_LINK, "Advertising 10G\n");
4478 /* Restart autoneg for 10G*/ 4461 /* Restart autoneg for 10G*/
4479 bnx2x_cl45_read(bp, params->port, 4462
4480 ext_phy_type,
4481 ext_phy_addr,
4482 MDIO_AN_DEVAD,
4483 MDIO_AN_REG_CTRL, &val);
4484 val |= 0x200;
4485 bnx2x_cl45_write(bp, params->port, 4463 bnx2x_cl45_write(bp, params->port,
4486 ext_phy_type, 4464 ext_phy_type,
4487 ext_phy_addr, 4465 ext_phy_addr,
4488 MDIO_AN_DEVAD, 4466 MDIO_AN_DEVAD,
4489 MDIO_AN_REG_CTRL, val); 4467 MDIO_AN_REG_CTRL, 0x3200);
4490 } 4468 }
4491 } else { 4469 } else {
4492 /* Force speed */ 4470 /* Force speed */