diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-01-31 04:22:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 13:22:44 -0800 |
commit | 1bef68e3f5d25e17adc5232dc0ad7c0ea0188374 (patch) | |
tree | cc60004b8681e56f19ba199f8a50a102c7da42d2 /drivers/net/bnx2x/bnx2x_link.c | |
parent | c87bca1eaa493779392378b69fe646644580942a (diff) | |
download | linux-3.10-1bef68e3f5d25e17adc5232dc0ad7c0ea0188374.tar.gz linux-3.10-1bef68e3f5d25e17adc5232dc0ad7c0ea0188374.tar.bz2 linux-3.10-1bef68e3f5d25e17adc5232dc0ad7c0ea0188374.zip |
bnx2x: Add CMS functionality for 848x3
Add CMS(Common Mode Sense) functionality for 848x3 as this reduces power consumption and allows a better 10G link stability
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.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 7d3e7e2c75c..4a1b5ee976b 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c @@ -6257,7 +6257,7 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy, u8 port, initialize = 1; u16 val, adj; u16 temp; - u32 actual_phy_selection; + u32 actual_phy_selection, cms_enable; u8 rc = 0; /* This is just for MDIO_CTL_REG_84823_MEDIA register. */ @@ -6329,6 +6329,21 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy, rc = bnx2x_848xx_cmn_config_init(phy, params, vars); else bnx2x_save_848xx_spirom_version(phy, params); + cms_enable = REG_RD(bp, params->shmem_base + + offsetof(struct shmem_region, + dev_info.port_hw_config[params->port].default_cfg)) & + PORT_HW_CFG_ENABLE_CMS_MASK; + + bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, + MDIO_CTL_REG_84823_USER_CTRL_REG, &val); + if (cms_enable) + val |= MDIO_CTL_REG_84823_USER_CTRL_CMS; + else + val &= ~MDIO_CTL_REG_84823_USER_CTRL_CMS; + bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, + MDIO_CTL_REG_84823_USER_CTRL_REG, val); + + return rc; } |