aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2014-10-01 01:25:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-01 16:46:34 -0400
commit204c8704128943bf3f8b605f4b40bdc2b6bd89dc (patch)
tree308563da021863e02d06a0948a5fea07636ec41e
parent1b0ecb28b0cc216535ce6477d39aa610c3ff68a1 (diff)
r8152: remove clearing bp
The xxx_clear_bp() is used to halt the firmware. It only necessary for updating the new firmware. Besides, depend on the version of the current firmware, it may have problem to halt the firmware directly. Finally, halt the firmware would let the firmware code useless, and the bugs which are fixed by the firmware would occur. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/r8152.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f68a4e6f45be..18b9e0d7d6bb 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -24,7 +24,7 @@
24#include <net/ip6_checksum.h> 24#include <net/ip6_checksum.h>
25 25
26/* Version Information */ 26/* Version Information */
27#define DRIVER_VERSION "v1.06.0 (2014/03/03)" 27#define DRIVER_VERSION "v1.06.1 (2014/10/01)"
28#define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>" 28#define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>"
29#define DRIVER_DESC "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters" 29#define DRIVER_DESC "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters"
30#define MODULENAME "r8152" 30#define MODULENAME "r8152"
@@ -2201,28 +2201,6 @@ static void rtl_phy_reset(struct r8152 *tp)
2201 } 2201 }
2202} 2202}
2203 2203
2204static void rtl_clear_bp(struct r8152 *tp)
2205{
2206 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_0, 0);
2207 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_2, 0);
2208 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_4, 0);
2209 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_6, 0);
2210 ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_0, 0);
2211 ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_2, 0);
2212 ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_4, 0);
2213 ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_6, 0);
2214 mdelay(3);
2215 ocp_write_word(tp, MCU_TYPE_PLA, PLA_BP_BA, 0);
2216 ocp_write_word(tp, MCU_TYPE_USB, USB_BP_BA, 0);
2217}
2218
2219static void r8153_clear_bp(struct r8152 *tp)
2220{
2221 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_BP_EN, 0);
2222 ocp_write_byte(tp, MCU_TYPE_USB, USB_BP_EN, 0);
2223 rtl_clear_bp(tp);
2224}
2225
2226static void r8153_teredo_off(struct r8152 *tp) 2204static void r8153_teredo_off(struct r8152 *tp)
2227{ 2205{
2228 u32 ocp_data; 2206 u32 ocp_data;
@@ -2265,8 +2243,6 @@ static void r8152b_hw_phy_cfg(struct r8152 *tp)
2265 r8152_mdio_write(tp, MII_BMCR, data); 2243 r8152_mdio_write(tp, MII_BMCR, data);
2266 } 2244 }
2267 2245
2268 rtl_clear_bp(tp);
2269
2270 set_bit(PHY_RESET, &tp->flags); 2246 set_bit(PHY_RESET, &tp->flags);
2271} 2247}
2272 2248
@@ -2417,8 +2393,6 @@ static void r8153_hw_phy_cfg(struct r8152 *tp)
2417 r8152_mdio_write(tp, MII_BMCR, data); 2393 r8152_mdio_write(tp, MII_BMCR, data);
2418 } 2394 }
2419 2395
2420 r8153_clear_bp(tp);
2421
2422 if (tp->version == RTL_VER_03) { 2396 if (tp->version == RTL_VER_03) {
2423 data = ocp_reg_read(tp, OCP_EEE_CFG); 2397 data = ocp_reg_read(tp, OCP_EEE_CFG);
2424 data &= ~CTAP_SHORT_EN; 2398 data &= ~CTAP_SHORT_EN;