aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2014-02-18 08:49:03 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-18 16:40:01 -0500
commitf0cbe0ac87c123a80dac3b2df72ecb947ef63ad8 (patch)
treec4887d0bb3dbc88891d6cfaaeb6c9dc19aeb13a7 /drivers/net/usb
parentd84130a10820d074fe52b066f459838324d3774c (diff)
r8152: clear BMCR_PDOWN
Modify the method of enabling the PHY to clear BMCR_PDOWN only. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/r8152.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2a778faa9630..c7bae3920038 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1845,7 +1845,14 @@ static inline void r8152b_enable_aldps(struct r8152 *tp)
1845 1845
1846static void r8152b_hw_phy_cfg(struct r8152 *tp) 1846static void r8152b_hw_phy_cfg(struct r8152 *tp)
1847{ 1847{
1848 r8152_mdio_write(tp, MII_BMCR, BMCR_ANENABLE); 1848 u16 data;
1849
1850 data = r8152_mdio_read(tp, MII_BMCR);
1851 if (data & BMCR_PDOWN) {
1852 data &= ~BMCR_PDOWN;
1853 r8152_mdio_write(tp, MII_BMCR, data);
1854 }
1855
1849 r8152b_disable_aldps(tp); 1856 r8152b_disable_aldps(tp);
1850} 1857}
1851 1858
@@ -1995,7 +2002,11 @@ static void r8153_hw_phy_cfg(struct r8152 *tp)
1995 u16 data; 2002 u16 data;
1996 2003
1997 ocp_reg_write(tp, OCP_ADC_CFG, CKADSEL_L | ADC_EN | EN_EMI_L); 2004 ocp_reg_write(tp, OCP_ADC_CFG, CKADSEL_L | ADC_EN | EN_EMI_L);
1998 r8152_mdio_write(tp, MII_BMCR, BMCR_ANENABLE); 2005 data = r8152_mdio_read(tp, MII_BMCR);
2006 if (data & BMCR_PDOWN) {
2007 data &= ~BMCR_PDOWN;
2008 r8152_mdio_write(tp, MII_BMCR, data);
2009 }
1999 2010
2000 if (tp->version == RTL_VER_03) { 2011 if (tp->version == RTL_VER_03) {
2001 data = ocp_reg_read(tp, OCP_EEE_CFG); 2012 data = ocp_reg_read(tp, OCP_EEE_CFG);