aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2012-04-03 21:28:55 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-04 18:24:22 -0400
commitca05f29cf515ac4a8e162c8e0eee886727f5dcc7 (patch)
tree2a34b5ba619ad1e2c7871181885560c090585f35 /drivers
parent27d9129f5ae830cc031a898e0c220e1cdda69b34 (diff)
bnx2x: Fix BCM57810-KR FC
Fix 57810-KR flow-control handling link is achieved via CL37 AN. 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')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c27
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h4
2 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 7e2ebbad7587..8c00bbc94038 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -3655,6 +3655,33 @@ static void bnx2x_ext_phy_update_adv_fc(struct bnx2x_phy *phy,
3655 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) { 3655 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) {
3656 bnx2x_cl22_read(bp, phy, 0x4, &ld_pause); 3656 bnx2x_cl22_read(bp, phy, 0x4, &ld_pause);
3657 bnx2x_cl22_read(bp, phy, 0x5, &lp_pause); 3657 bnx2x_cl22_read(bp, phy, 0x5, &lp_pause);
3658 } else if (CHIP_IS_E3(bp) &&
3659 SINGLE_MEDIA_DIRECT(params)) {
3660 u8 lane = bnx2x_get_warpcore_lane(phy, params);
3661 u16 gp_status, gp_mask;
3662 bnx2x_cl45_read(bp, phy,
3663 MDIO_AN_DEVAD, MDIO_WC_REG_GP2_STATUS_GP_2_4,
3664 &gp_status);
3665 gp_mask = (MDIO_WC_REG_GP2_STATUS_GP_2_4_CL73_AN_CMPL |
3666 MDIO_WC_REG_GP2_STATUS_GP_2_4_CL37_LP_AN_CAP) <<
3667 lane;
3668 if ((gp_status & gp_mask) == gp_mask) {
3669 bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD,
3670 MDIO_AN_REG_ADV_PAUSE, &ld_pause);
3671 bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD,
3672 MDIO_AN_REG_LP_AUTO_NEG, &lp_pause);
3673 } else {
3674 bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD,
3675 MDIO_AN_REG_CL37_FC_LD, &ld_pause);
3676 bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD,
3677 MDIO_AN_REG_CL37_FC_LP, &lp_pause);
3678 ld_pause = ((ld_pause &
3679 MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH)
3680 << 3);
3681 lp_pause = ((lp_pause &
3682 MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH)
3683 << 3);
3684 }
3658 } else { 3685 } else {
3659 bnx2x_cl45_read(bp, phy, 3686 bnx2x_cl45_read(bp, phy,
3660 MDIO_AN_DEVAD, 3687 MDIO_AN_DEVAD,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
index ecc7fa6a6ca5..1ea2b956e194 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
@@ -6944,6 +6944,10 @@ Theotherbitsarereservedandshouldbezero*/
6944#define MDIO_WC_REG_GP2_STATUS_GP_2_2 0x81d2 6944#define MDIO_WC_REG_GP2_STATUS_GP_2_2 0x81d2
6945#define MDIO_WC_REG_GP2_STATUS_GP_2_3 0x81d3 6945#define MDIO_WC_REG_GP2_STATUS_GP_2_3 0x81d3
6946#define MDIO_WC_REG_GP2_STATUS_GP_2_4 0x81d4 6946#define MDIO_WC_REG_GP2_STATUS_GP_2_4 0x81d4
6947#define MDIO_WC_REG_GP2_STATUS_GP_2_4_CL73_AN_CMPL 0x1000
6948#define MDIO_WC_REG_GP2_STATUS_GP_2_4_CL37_AN_CMPL 0x0100
6949#define MDIO_WC_REG_GP2_STATUS_GP_2_4_CL37_LP_AN_CAP 0x0010
6950#define MDIO_WC_REG_GP2_STATUS_GP_2_4_CL37_AN_CAP 0x1
6947#define MDIO_WC_REG_UC_INFO_B0_DEAD_TRAP 0x81EE 6951#define MDIO_WC_REG_UC_INFO_B0_DEAD_TRAP 0x81EE
6948#define MDIO_WC_REG_UC_INFO_B1_VERSION 0x81F0 6952#define MDIO_WC_REG_UC_INFO_B1_VERSION 0x81F0
6949#define MDIO_WC_REG_UC_INFO_B1_FIRMWARE_MODE 0x81F2 6953#define MDIO_WC_REG_UC_INFO_B1_FIRMWARE_MODE 0x81F2